note 112856 added to function.openlog

From: Date: Tue, 30 Jul 2013 11:07:37 +0000
Subject: note 112856 added to function.openlog
Groups: php.notes 
Request: Send a blank email to php-notes+get-195820@lists.php.net to get a copy of this message
To those curious; switching between different facilities is NOT an issue. There is no apparent memory overhead (nor slowdown) by calling openlog multiple(12 * 10000) times. Shown by this example: <?php $facilities = array( LOG_AUTH, LOG_AUTHPRIV, LOG_CRON, LOG_DAEMON, LOG_KERN, LOG_LOCAL0, LOG_LPR, LOG_MAIL, LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP, ); for ($i = 0; $i < 10000; $i++) { foreach ($facilities as $facility) { openlog('test', LOG_PID, $facility); syslog(LOG_ERR, "This is a test: " . memory_get_usage(true)); } } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 178.132.215.131 ---- Manual Page -- http://php.net/manual/en/function.openlog.php Edit -- https://master.php.net/note/edit/112856 Del: integrated -- https://master.php.net/note/delete/112856/integrated Del: useless -- https://master.php.net/note/delete/112856/useless Del: bad code -- https://master.php.net/note/delete/112856/bad+code Del: spam -- https://master.php.net/note/delete/112856/spam Del: non-english -- https://master.php.net/note/delete/112856/non-english Del: in docs -- https://master.php.net/note/delete/112856/in+docs Del: other reasons-- https://master.php.net/note/delete/112856 Reject -- https://master.php.net/note/reject/112856 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195820) next »