Last active
January 9, 2016 08:18
-
-
Save lbp0200/2f45522ceb2b48f06e93 to your computer and use it in GitHub Desktop.
PHP记录日志的正确姿势(linux下适用)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openlog('php program', LOG_PID, LOG_USER); | |
syslog(LOG_ERR, "This is a test: " . memory_get_usage(true)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rsyslog.conf | |
if $programname == 'php program' then /var/log/fuckphp.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment