Koha::Logger->get( interface => 'opac' ) should write to plack-opac under plack. We still need a few tiny tweaks in Context and Logger.
Created attachment 139821 [details] [review] Bug 31468: Changes to C4::Context::is_psgi_or_plack When running API, we need to look for $ENV{PLACK_ENV}, but the underscore is not included in the Context sub. Test plan: Run t/Context.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 139822 [details] [review] Bug 31468: Change interface in Koha::Logger Test plan: Add a line in mainpage.pl: require Koha::Logger; Koha::Logger->get->warn("intranet L51"); Restart. Hit intranet mainpage. Verify that line is in plack=intranet. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is trivial and architectural. Going to SO rightaway. Need this for 22678 too.
Could you have a look, Martin ?
I have recollections of trying to improve the Context method before and getting caught by all sorts of weird side effects.. do you happen to remember the details David?
Lots of discussion around our various implimentations of 'Is this a plack/psgi session' in bug 29420
My gut says we should finally test and push bug 29744 before this.. harmonizing the plack detection and then use it here too
(In reply to Martin Renvoize from comment #5) > I have recollections of trying to improve the Context method before and > getting caught by all sorts of weird side effects.. do you happen to > remember the details David? Not really but I think bug 29744 probably took care of it?
(In reply to Martin Renvoize from comment #7) > My gut says we should finally test and push bug 29744 before this.. > harmonizing the plack detection and then use it here too Sure, I will have a look at the other one. Although it is pretty straightforward to harmonize if we would go the other way around. Still something to discuss here?
Comment on attachment 139821 [details] [review] Bug 31468: Changes to C4::Context::is_psgi_or_plack This has been moved and adjusted on bug 29744
Created attachment 140693 [details] [review] Bug 31468: Change interface in Koha::Logger Test plan: Add a line in mainpage.pl: require Koha::Logger; Koha::Logger->get->warn("intranet L51"); Restart. Hit intranet mainpage. Verify that line is in plack=intranet. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Retested with L49 now ;)
Created attachment 140697 [details] [review] Bug 31468: Change interface in Koha::Logger Test plan: Add a line in mainpage.pl: require Koha::Logger; Koha::Logger->get->warn("intranet L51"); Restart. Hit intranet mainpage. Verify that line is in plack=intranet. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Retested with L49 now ;) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All working and thanks for cleaning up 29744 more for us. Passing QA
Pushed to master for 22.11. Nice work everyone, thanks!
Missing dependencies for 22.05.x, no backport