3 require_once DOL_DOCUMENT_ROOT.
'/core/modules/syslog/logHandler.php';
10 public $code =
'syslog';
41 return $langs->trans(
'OnlyWindowsLOG_USER');
54 if (!function_exists(
'openlog'))
return 0;
56 return empty($conf->global->SYSLOG_DISABLE_LOGHANDLER_SYSLOG) ? 1 : 0;
70 'constant' =>
'SYSLOG_FACILITY',
71 'name' => $langs->trans(
'SyslogFacility'),
72 'default' =>
'LOG_USER'
88 $facility = constant($conf->global->SYSLOG_FACILITY);
92 if (!empty(
$_SERVER[
"WINDIR"])) $facility = constant(
'LOG_USER');
94 dol_syslog(
"admin/syslog: facility ".$facility);
96 $errors[] = $langs->trans(
"ErrorUnknownSyslogConstant", $facility);
112 if (!empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG))
return;
114 if (!empty($conf->global->SYSLOG_FACILITY))
116 $facility = constant($conf->global->SYSLOG_FACILITY);
117 }
else $facility = constant(
'LOG_USER');
120 openlog(
'dolibarr', LOG_PID | LOG_PERROR, (
int) $facility);
121 syslog($content[
'level'], $content[
'message']);
checkConfiguration()
Return if configuration is valid.
getInfo()
Content of the info tooltip.
Class to manage logging to syslog.
getName()
Return name of logger.
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')
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
print $_SERVER["PHP_SELF"]
Edit parameters.
export($content)
Export the message.
Parent class for log handlers.