|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-06-11 18:10 UTC] ef-lists at email dot de
Description: ------------ At current, FPM only allows logging to local files, both for the ErrorLog and SlowLog. Using syslog aids the administrator greatly in centralizing logfiles. Also PHP itself has syslog support, so FPM should consequently have it, too. I hereby ask to add syslog support to FPM. Patchesfpm-syslog.v5.patch (last revision 2011-01-28 14:48 UTC by ef-lists at email dot de)fpm-syslog.v4.patch (last revision 2010-07-07 10:14 UTC by ef-lists at email dot de) fpm-syslog.v3.patch (last revision 2010-06-13 09:03 UTC by fat@php.net) fpm-syslog.v2.patch (last revision 2010-06-13 08:36 UTC by fat@php.net) fpm-syslog.v1.patch (last revision 2010-06-12 16:47 UTC by fat@php.net) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 22:00:01 2025 UTC |
I tried this out in a development snapshot for PHP 5.3.7, but found that calls to zlog() from children were not showing up in syslog. The following change fixes the problem; let me know if you'd like me to upload a new version of the patch. diff -up php-snap/sapi/fpm/fpm/fpm_stdio.c.syslog php-snap/sapi/fpm/fpm/fpm_st dio.c --- php-snap/sapi/fpm/fpm/fpm_stdio.c.syslog 2011-04-11 19:10:17.425036568 -0 400 +++ php-snap/sapi/fpm/fpm/fpm_stdio.c 2011-04-11 19:10:24.569131370 -0400 @@ -64,9 +64,9 @@ int fpm_stdio_init_child(struct fpm_work #endif { close(fpm_globals.error_log_fd); + fpm_globals.error_log_fd = -1; + zlog_set_fd(-1); } - fpm_globals.error_log_fd = -1; - zlog_set_fd(-1); if (wp->listening_socket != STDIN_FILENO) { if (0 > dup2(wp->listening_socket, STDIN_FILENO)) {