https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16312
Olli-Antti Kivilahti <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #50472|0 |1 is obsolete| | --- Comment #3 from Olli-Antti Kivilahti <[email protected]> --- Created attachment 50495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50495&action=edit Bug 16312 - Koha::Logger overload configuration for command line scripts verbosity levels To be able to set the -v|--verbose flags from the command line and still use Koha::Logger, we must be able to overload/extend default appenders and log levels on a easy case-by-case basis directly from the Perl-code. To deploy verbose mode in a commandline script, add the following code to your cronjob/script: use C4::Context; use Koha::Logger; C4::Context->setCommandlineEnvironment(); Koha::Logger->setConsoleVerbosity( 1 || -3 || 'WARN' || ... ); The module using the Koha::Logger must lazyLoad the module/package-level logger using Koha::Logger->new(), so the overloads can be deployed. See attached tests and perldoc for more info. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
