[Koha-bugs] [Bug 16313] New: Koha::Logger doesn't forward the Log::Log4perl::Logger return value

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 20 19:26:39 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16313

            Bug ID: 16313
           Summary: Koha::Logger doesn't forward the Log::Log4perl::Logger
                    return value
 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

Log::Log4perl::Logger->$method
 returns undef if the log level is not logged or something bad happened and
true or something similar on success. This allows chaining different loggers to
trigger if Log4perl failed to log.

Koha::Logger is hardwired to return 1 if Log4perl is configured properly
regardless of whether the Log4perl actually succeeded in printing the log
message.

This is a Log4perl best practice:

$Koha::Logger->debug() or syslog("LOG_DEBUG", ...);
which should revert to syslog() to log if Log4perl cannot for some reason do
the logging. (eg. is disabled)

This patch makes the Koha::Logger work with Log4perl better in tandem and
return the proper return values.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list