https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16509 Bug ID: 16509 Summary: Koha::Logger dies when log4perl.conf has FileAppender files with different permissions, also compatibility with logrotate Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org We define all the logging configurations for various interfaces in log4perl.conf. Interfaces log to files, and every interface can run as a different user. Every time you execute a Perl program that uses Koha::Logger and Log::Log4perl, Log::Log4perl tries to open all the filehandles in the log4perl.conf. Since different interface logs should be owned by different users, this crashes the system. Can't sysopen /home/koha/koha-dev/var/log/intranet.log (Permission denied) at /usr/local/share/perl/5.18.2/Log/Log4perl/Appender/File.pm line 120. This patch introduces lazy-loading parameters to the FileAppenders, so they open only the files they need. Koha::Logger makes sure they always use the correct log file for the interface (opac, intranet, commandline, sip, restapi, ...). log4perl.appender.CLI.syswrite=true log4perl.appender.*.create_at_logtime=true Also while working on this bug identified as a target of opportunity some useful extra parameters for the appenders. log4perl.appender.*.syswrite=true This should solve concurrency issues under multithreaded Perl-apps such as what Mojolicious should be ran as. log4perl.appender.*.recreate=true This polls the filesystem path to the logfile for changes. Eg. if logrotate of the admin might move the logfile for storage purposes, Log4perl can recreate the missing file, instead of writing to the moved file. -- You are receiving this mail because: You are watching all bug changes.