Funkce PHP openlog() .
Příklad
Otevřít a zavřít připojení systémového loggeru:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Definice a použití
Funkce openlog() otevře připojení systémového loggeru.
Syntax
openlog(ident, option, facility)
Hodnoty parametrů
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:
|
Technické údaje
Návratová hodnota: | PRAVDA při úspěchu, NEPRAVDA při neúspěchu |
---|---|
Verze PHP: | 4,0+ |
❮ Síťová reference PHP