Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
bdc.bdcloud.fr /
core /
modules /
syslog /
Delete
Unzip
Name
Size
Permission
Date
Action
logHandler.php
1.93
KB
-rwxr-x---
2023-04-04 15:50
logHandlerInterface.php
1.84
KB
-rwxr-x---
2023-04-04 15:50
mod_syslog_file.php
4.81
KB
-rwxr-x---
2023-04-04 15:50
mod_syslog_syslog.php
2.57
KB
-rwxr-x---
2023-04-04 15:50
Save
Rename
<?php require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; /** * Class to manage logging to syslog */ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface { public $code = 'syslog'; /** * Return name of logger * * @return string Name of logger */ public function getName() { return 'Syslogd'; } /** * Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development') * * @return string */ public function getVersion() { return 'dolibarr'; } /** * Content of the info tooltip. * * @return false|string */ public function getInfo() { global $langs; return $langs->trans('OnlyWindowsLOG_USER'); } /** * Is the module active ? * * @return int */ public function isActive() { global $conf; // This function does not exists on some ISP (Ex: Free in France) if (!function_exists('openlog')) { return 0; } return empty($conf->global->SYSLOG_DISABLE_LOGHANDLER_SYSLOG) ? 1 : 0; // Set SYSLOG_DISABLE_LOGHANDLER_SYSLOG to 1 to disable this loghandler } /** * Return array of configuration data * * @return array Return array of configuration data */ public function configure() { global $langs; return array( array( 'constant' => 'SYSLOG_FACILITY', 'name' => $langs->trans('SyslogFacility'), 'default' => 'LOG_USER' ) ); } /** * Return if configuration is valid * * @return array Array of errors. Empty array if ok. */ public function checkConfiguration() { global $conf, $langs; $errors = array(); $facility = constant($conf->global->SYSLOG_FACILITY); if ($facility) { // Only LOG_USER supported on Windows if (!empty($_SERVER["WINDIR"])) { $facility = constant('LOG_USER'); } dol_syslog("admin/syslog: facility ".$facility); } else { $errors[] = $langs->trans("ErrorUnknownSyslogConstant", $facility); } return $errors; } /** * Export the message * * @param array $content Array containing the info about the message * @return void */ public function export($content) { global $conf; if (!empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG)) { return; // Global option to disable output of this handler } if (!empty($conf->global->SYSLOG_FACILITY)) { // Example LOG_USER $facility = constant($conf->global->SYSLOG_FACILITY); } else { $facility = constant('LOG_USER'); } // (int) is required to avoid error parameter 3 expected to be long openlog('dolibarr', LOG_PID | LOG_PERROR, (int) $facility); syslog($content['level'], $content['message']); closelog(); } }