[Koha-bugs] [Bug 32612] Koha background worker should log to the worker-error.log

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 3 10:51:02 CET 2023


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

--- Comment #26 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Confirming that warns and Koha::Logger go to worker-output now. The start/stop
statements end up in worker-error. Worker.log is not used.

koha-worker does this:
        DAEMONOPTS="--name=${worker_name} \
            --errlog=/var/log/koha/$name/worker-error.log \
            --stdout=/var/log/koha/$name/worker.log \
            --output=/var/log/koha/$name/worker-output.log \

Since --output includes stdout, it seems that the --stdout line is useless. The
client stdout is formally included in --output. But it seems to be discarded
anyway since we are running in the background.
I tested print statements in background-worker and they go nowhere.
Removed the worker.log line in a follow-up.

Daemon docs says:
-l spec, --errlog=spec
Send daemon's standard output and error to the syslog destination or file
specified by spec. If spec is of the form "facility.priority", then output is
sent to syslog(3). Otherwise, output is appended to the file whose path is
given in spec. By default, output is sent to daemon.err.
-O spec, --stdout=spec
Capture the client's standard output and send it to the syslog destination or
file specified by spec. If spec is of the form "facility.priority", then output
is sent to syslog(3). Otherwise, stdout is appended to the file whose path is
given in spec. By default, stdout is discarded unless the --foreground option
is present, in which case, the client's stdout is propagated to daemon's
stdout.
-o spec, --output=spec
Capture the client's standard output and error and send it to the syslog
destination or file specified by spec. If spec is of the form
"facility.priority", then output is sent to syslog (3). Otherwise, output is
appended to the file whose path is given in spec. By default, output is
discarded unless the --foreground option is present. In this case, the client's
stdout and stderr are propagated to daemon's stdout and stderr respectively.

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


More information about the Koha-bugs mailing list