3require_once DOL_DOCUMENT_ROOT.
'/core/modules/syslog/logHandler.php';
10 public $code =
'syslog';
41 return $langs->trans(
'OnlyWindowsLOG_USER');
54 if (!function_exists(
'openlog')) {
72 'constant' =>
'SYSLOG_FACILITY',
73 'name' => $langs->trans(
'SyslogFacility'),
74 'default' =>
'LOG_USER'
90 $facility = constant($conf->global->SYSLOG_FACILITY);
93 if (!empty($_SERVER[
"WINDIR"])) {
94 $facility = constant(
'LOG_USER');
97 dol_syslog(
"admin/syslog: facility ".$facility);
99 $errors[] = $langs->trans(
"ErrorUnknownSyslogConstant", $facility);
120 $facility = constant($conf->global->SYSLOG_FACILITY);
122 $facility = constant(
'LOG_USER');
126 openlog(
'dolibarr', LOG_PID | LOG_PERROR, (
int) $facility);
127 syslog($content[
'level'], $content[
'message']);
Parent class for log handlers.
Class to manage logging to syslog.
configure()
Return array of configuration data.
isActive()
Is the module active ?
getVersion()
Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
checkConfiguration()
Return if configuration is valid.
getInfo()
Content of the info tooltip.
getName()
Return name of logger.
export($content)
Export the message.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.