rfc:allow_multiple_simultaneous_syslog_connections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:allow_multiple_simultaneous_syslog_connections [2011/07/05 13:16] – [Proposal] fatrfc:allow_multiple_simultaneous_syslog_connections [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Allow multiple simultaneous syslog connections  ====== ====== Allow multiple simultaneous syslog connections  ======
-  * Version: 1.0+  * Version: 0.1
   * Date: 2011-07-05   * Date: 2011-07-05
   * Author: Jérôme Loyet <fat@php.net>   * Author: Jérôme Loyet <fat@php.net>
-  * Status: Under Discussion+  * Status: Dead as no one seem to be interested in
   * First Published at: https://wiki.php.net/rfc/syslog_enhancement   * First Published at: https://wiki.php.net/rfc/syslog_enhancement
   * Original discussion: http://marc.info/?l=php-internals&m=129639452805700&w=2   * Original discussion: http://marc.info/?l=php-internals&m=129639452805700&w=2
Line 19: Line 19:
 The proposed implementation should not break any current usage of syslog functions. Here is the changes : The proposed implementation should not break any current usage of syslog functions. Here is the changes :
   * add error_log_facility and error_log_ident variables to php.ini in order to defined default syslog parameters.   * add error_log_facility and error_log_ident variables to php.ini in order to defined default syslog parameters.
 +    * error_log_facility is set to LOG_USER by default
 +    * errir_log_ident is set to "php" by default
   * add main/php_syslog.c file with :   * add main/php_syslog.c file with :
-    * Add 3 variable in the struct _php_core_globals to keep trace of syslog options over the syslog() calls.+    * Add 3 variable in the struct _php_core_globals to keep trace of syslog options over the php_syslog2() calls.
     * php_openlog: save ident, facility and option in its global context before calling openlog.     * php_openlog: save ident, facility and option in its global context before calling openlog.
     * php_closelog: clear global context before calling closelog     * php_closelog: clear global context before calling closelog
Line 42: Line 44:
   syslog(LOG_ERR, "test 1 wihout calling openlog");   syslog(LOG_ERR, "test 1 wihout calling openlog");
   /*   /*
-    ident is default (the process name) aka "php"+    ident is default aka "php"
     Jul 23 05:20:22 hostname php: test 1 wihout calling openlog     Jul 23 05:20:22 hostname php: test 1 wihout calling openlog
   */   */
Line 66: Line 68:
   syslog(LOG_ERR, "test 2 without openlog");   syslog(LOG_ERR, "test 2 without openlog");
   /*   /*
-    as $r1 and $r2 have been closed, ident has been reset to default (the process name) aka "php"+    as $r1 and $r2 have been closed, ident has been reset to default aka "php"
     Jul 23 05:20:22 hostname php: test 2 wihout calling openlog     Jul 23 05:20:22 hostname php: test 2 wihout calling openlog
   */   */
Line 74: Line 76:
   /*   /*
     openlog has been called, so ident not the default until closelog() call     openlog has been called, so ident not the default until closelog() call
-    Jul 23 05:20:22 hostname php: test 3 with openlog() but without ressource+    Jul 23 05:20:22 hostname php[24144]: test 3 with openlog() but without ressource
   */   */
   closelog();   closelog();
   syslog(LOG_ERR, "test 4 without calling openlog");   syslog(LOG_ERR, "test 4 without calling openlog");
   /*   /*
-    closelog() has been called, ident has been reset to default (the process name) aka "php"+    closelog() has been called, ident has been reset to default aka "php"
     Jul 23 05:20:22 hostname php: test 4 wihout calling openlog     Jul 23 05:20:22 hostname php: test 4 wihout calling openlog
   */   */
Line 87: Line 89:
 ===== Patch ===== ===== Patch =====
   * The source patch can be found with the ticket: https://bugs.php.net/bug.php?id=51118   * The source patch can be found with the ticket: https://bugs.php.net/bug.php?id=51118
 +  * The patch has not been tested on win32 yet and it needs small adjustments.
   * The documentation has not been patched yet. (waiting for approval)   * The documentation has not been patched yet. (waiting for approval)
   * Tests have not been done/updated yet. (waiting for approval)   * Tests have not been done/updated yet. (waiting for approval)
Line 96: Line 99:
 ===== Changelog ===== ===== Changelog =====
   * 2011/07/05 Draft   * 2011/07/05 Draft
 +  * 2011/07/05 first revision
 +  * 2011/10/08 marked as dead
rfc/allow_multiple_simultaneous_syslog_connections.1309871772.txt.gz · Last modified: 2017/09/22 13:28 (external edit)