zonemaster / zonemaster-backend

The Zonemaster Backend - part of the Zonemaster project
Other
14 stars 23 forks source link

Pre-fork logging in RPCAPI #736

Open mattias-p opened 3 years ago

mattias-p commented 3 years ago

Today log messages from the RPCAPI worker processes are properly stored in the log file, but messages from the psgi script before forking are sent to STDERR. What happens with those messages depends on context. If you're starting the daemon from your terminal the messages end up in your terminal. If systemd is staring the daemon the messages end up in the journal. If the FreeBSD init system is starting the daemon the messages are dropped and never to be found.

Log messages from the pre-fork phase of the RPCAPI daemon must be stored together with the messages from the worker processes.

mattias-p commented 2 years ago

See these comments for concrete examples: