note 18624 added to function.syslog
| From: | dpreece at php2 dot chek dot com | Date: | Tue, 29 Jan 2002 21:08:41 +0000 |
| Subject: | note 18624 added to function.syslog | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-25986@lists.php.net to get a copy of this message | ||
To set up a custom log file via the syslog daemon (FreeBSD in this case)...
Add to /etc/syslog.conf a line that says all errors from the httpd process are to go to a file
called (for example) /var/log/httpd-php.log
!httpd
*.* {tab} /var/log/httpd-php.log
Note the tab, being a tab character! Next create a blank file to be written to. I'm sure there
are 1e+6 ways to do this, but I choose
# cat > httpd-php.log << EOF
? EOF
Finally find your syslog daemon and send it a sighup to inform it of the change:
# ps ax | grep syslogd
133 ?? Ss 0:07.23 syslogd -s
# kill -1 133
Et voila! Php syslog calls will now arrive in /var/log/httpd-php.log
--
http://www.php.net/manual/en/function.syslog.php
http://master.php.net/manage/user-notes.php?action=edit+18624
http://master.php.net/manage/user-notes.php?action=delete+18624
http://master.php.net/manage/user-notes.php?action=reject+18624