note 79554 added to function.syslog
| From: | james dot ellis at gmail dot com | Date: | Mon, 03 Dec 2007 04:26:35 +0000 |
| Subject: | note 79554 added to function.syslog | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132760@lists.php.net to get a copy of this message | ||
If anyone is wondering why their log messages are appearing in multiple log files, here is one
answer applying to *nix systems:
If your syslog.conf looks like this (assuming you use LOG_LOCAL0 for web app logging) :
local0.info /var/log/web/info.log
This will collect *all* messages of LOG_INFO level and higher, i.e everything except debug messages
Try this instead to ensure that only messages of the named log level go into the relevant log file:
local0.=info /var/log/web/info.log
Additionally, you may like to add this to ensure your messages don't end up in generic log
files like "messages" "all" "syslog" and "debug":
local0.none /var/log/messages
local0.none /var/log/debug
etc
saves disk space among other things - more at "man syslog.conf"
----
Server IP: 203.16.234.19
Probable Submitter: 202.173.133.239
----
Manual Page -- http://www.php.net/manual/en/function.syslog.php
Edit -- https://master.php.net/note/edit/79554
Del: integrated -- https://master.php.net/note/delete/79554/integrated
Del: useless -- https://master.php.net/note/delete/79554/useless
Del: bad code -- https://master.php.net/note/delete/79554/bad+code
Del: spam -- https://master.php.net/note/delete/79554/spam
Del: non-english -- https://master.php.net/note/delete/79554/non-english
Del: in docs -- https://master.php.net/note/delete/79554/in+docs
Del: other reasons-- https://master.php.net/note/delete/79554
Reject -- https://master.php.net/note/reject/79554
Search -- https://master.php.net/manage/user-notes.php