PHP openlog() İşlevi
Örnek
Sistem kaydedicinin bağlantısını açın ve kapatın:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Tanım ve Kullanım
openlog() işlevi, sistem günlükçüsünün bağlantısını açar.
Sözdizimi
openlog(ident, option, facility)
Parametre Değerleri
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:
|
Teknik detaylar
Geri dönüş değeri: | Başarıda DOĞRU, başarısızlıkta YANLIŞ |
---|---|
PHP Sürümü: | 4.0+ |
❮ PHP Ağ Referansı