[Koha-bugs] [Bug 28477] New: INTRANET and OPAC loggers should print to STDERR instead of to file
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri May 28 02:25:25 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28477
Bug ID: 28477
Summary: INTRANET and OPAC loggers should print to STDERR
instead of to file
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: dcook at prosentient.com.au
QA Contact: testopia at bugs.koha-community.org
Bug 25284 notes that Plack will fail to start up if the
/var/log/koha/<site>/opac-error.log file isn't writeable by the specific Koha
Linux user. It has a workaround for chowning all the log files, but that's
really not the best way to go.
We shouldn't be messing around with the log files that belong to the Apache web
server.
Instead, we should be printing to STDERR using the Log4Perl logger. For CGI
Koha using Apache, that text will wind up in the correct web server log file
automatically. For Plack Koha, it would wind up the correct web server log file
as well... or thanks to Bug 16357 they'll wind up special log files created and
owned by Koha.
It's as easy as changing the Log4Perl configuration as follows:
FROM:
log4perl.appender.INTRANET=Log::Log4perl::Appender::File
log4perl.appender.INTRANET.filename=__LOG_DIR__/intranet-error.log
log4perl.appender.OPAC=Log::Log4perl::Appender::File
log4perl.appender.OPAC.filename=__LOG_DIR__/opac-error.log
TO:
log4perl.appender.INTRANET=Log::Log4perl::Appender::Screen
log4perl.appender.INTRANET.stderr = 1
log4perl.appender.OPAC=Log::Log4perl::Appender::Screen
log4perl.appender.OPAC.stderr = 1
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list