PHP openlog() 함수
예시
시스템 로거 연결 열기 및 닫기:
<?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+ |
❮ PHP 네트워크 참조