Created
December 5, 2016 17:55
-
-
Save theharveyz/87bad6bc0338f6a9632a17fa6e6c1d0b to your computer and use it in GitHub Desktop.
php生成一个system log 日志
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
<?php | |
// open syslog, include the process ID and also send | |
// the log to standard error, and use a user defined | |
// logging mechanism | |
openlog("myScriptLog", LOG_PID | LOG_PERROR, LOG_LOCAL0); | |
$access = date("Y/m/d H:i:s"); | |
syslog(LOG_WARNING, "Unauthorized client: $access"); | |
closelog(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment