打开和关闭系统记录器的连接:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
openlog() 函数打开系统记录器的连接。
openlog(
ident,
option,
facility)
Parameter | Description |
---|---|
ident | Required. Specifies a string ident that is added to each message |
option | Required. Specifies what logging options will be used when generating a log message. Can be one or more of the following options (separated with |):
|
facility | Required. Specifies what type of program is logging the message:
|
返回值: | TRUE 成功,FALSE 失败 |
---|---|
PHP 版本: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!