Función PHP openlog()
Ejemplo
Abrir y cerrar la conexión del registrador del sistema:
<?php
function _log($text) {
openlog("phperrors", LOG_PID | LOG_PERROR);
syslog(LOG_ERR, $text);
closelog();
....
....
}
?>
Definición y uso
La función openlog() abre la conexión del registrador del sistema.
Sintaxis
openlog(ident, option, facility)
Valores paramétricos
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:
|
Detalles técnicos
Valor devuelto: | VERDADERO en caso de éxito, FALSO en caso de fracaso |
---|---|
Versión PHP: | 4.0+ |
❮ Referencia de la red PHP