1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00

Fix Bug #67530 error_log=syslog ignored

As for Bug #64915
Systemd use --nodaemonize but need to error_log to file or syslog to be honoured
This commit is contained in:
Remi Collet
2014-07-08 08:29:24 +02:00
parent 70e9d3e2f9
commit 60fd4d445c
+4
View File
@@ -268,7 +268,11 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */
if (!strcasecmp(fpm_global_config.error_log, "syslog")) {
openlog(fpm_global_config.syslog_ident, LOG_PID | LOG_CONS, fpm_global_config.syslog_facility);
fpm_globals.error_log_fd = ZLOG_SYSLOG;
#if HAVE_UNISTD_H
if (fpm_global_config.daemonize || !isatty(STDERR_FILENO)) {
#else
if (fpm_global_config.daemonize) {
#endif
zlog_set_fd(fpm_globals.error_log_fd);
}
return 0;