PHP openlog() Functie
Voorbeeld
Open en sluit verbinding van systeemlogger:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Definitie en gebruik
De functie openlog() opent de verbinding met de systeemlogger.
Syntaxis
openlog(ident, option, facility)
Parameterwaarden
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:
|
Technische details
Winstwaarde: | WAAR bij succes, ONWAAR bij mislukking |
---|---|
PHP-versie: | 4.0+ |
❮ PHP-netwerkreferentie