1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-16 06:25:23 +00:00

Stop sending log messages to client when in debug mode

inetd(8) sends the contents of stdout AND stderr to the client. This means that
configuring syslog(3) with LOG_PERROR (print messages to stderr) is a bad idea.
This commit is contained in:
Augustin Fabre 2022-05-29 14:17:45 +02:00
parent da3390089c
commit 9e7885f00f
No known key found for this signature in database
GPG Key ID: 99A01AA293FDA435

View File

@ -27,9 +27,7 @@ void log_init(int enable, int debug)
_enable = enable;
openlog(PROGNAME,
LOG_PID | (debug ? LOG_PERROR : 0),
LOG_DAEMON);
openlog(PROGNAME, LOG_PID, LOG_DAEMON);
setlogmask(_LOG_UPTO(debug ? LOG_DEBUG : LOG_INFO));
}