diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index b8cc257a7d9..207462b942a 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -109,9 +109,16 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface if (empty($conf->global->SYSLOG_FILE)) $tmp=DOL_DATA_ROOT.'/dolibarr.log'; else $tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE); - if (! empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) // file depend on session name (Note that session name is same for all users and is not a per user value) + if (! empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) { - $suffixinfilename = '_'.session_name(); + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) // file depend on session key name (Note that session name is same for all users and is not a per user value) + { + $suffixinfilename = '_'.session_name(); + } + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) // file depend on session value sor per user + { + $suffixinfilename = '_'.session_name().'_'.$_SERVER["REMOTE_ADDR"]; + } } return $suffixinfilename?preg_replace('/\.log$/i', $suffixinfilename.'.log', $tmp):$tmp;