PHP openlog() Fungsi
Contoh
Buka dan tutup koneksi logger sistem:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Definisi dan Penggunaan
Fungsi openlog() membuka koneksi logger sistem.
Sintaksis
openlog(ident, option, facility)
Nilai Parameter
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:
|
Detail Teknis
Nilai Kembali: | BENAR pada keberhasilan, SALAH pada kegagalan |
---|---|
Versi PHP: | 4.0+ |
Referensi Jaringan PHP