[Koha-bugs] [Bug 16312] New: Koha::Logger overload configuration for command line scripts verbosity levels
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 20 19:05:46 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16312
Bug ID: 16312
Summary: Koha::Logger overload configuration for command line
scripts verbosity levels
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: olli-antti.kivilahti at jns.fi
QA Contact: testopia at bugs.koha-community.org
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' || ... );
See attached tests and perldoc for more info.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list