syslog() - php 网络函数
syslog()
(PHP 4, PHP 5, PHP 7)
Generate a system log message
说明
syslog(int $priority,string $message): boolsyslog()generates a log message that will be distributed by the system logger.
For information on setting up a user defined log handler, see thesyslog.conf(5)Unix manual page. More information on the syslog facilities and option can be found in the man pages forsyslog(3)on Unix machines.
参数
$priority$priorityis a combination of the facility and the level. Possible values are:
Constant | Description |
---|---|
LOG_EMERG | system is unusable |
LOG_ALERT | action must be taken immediately |
LOG_CRIT | critical conditions |
LOG_ERR | error conditions |
LOG_WARNING | warning conditions |
LOG_NOTICE | normal, but significant, condition |
LOG_INFO | informational message |
LOG_DEBUG | debug-level message |
The message to send, except that the two characters%mwill be replaced by the error message string (strerror) corresponding to the present value oferrno.
返回值
成功时返回TRUE
,或者在失败时返回FALSE
。
范例
Usingsyslog()
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!