mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-10 09:52:33 +01:00
Fix: log must use the mask defined into setup
Conflicts: htdocs/core/modules/syslog/mod_syslog_file.php
This commit is contained in:
@@ -96,7 +96,12 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
||||
/**
|
||||
* Return the parsed logfile path
|
||||
*
|
||||
<<<<<<< OURS
|
||||
* @return string
|
||||
=======
|
||||
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
|
||||
* @return string
|
||||
>>>>>>> THEIRS
|
||||
*/
|
||||
private function getFilename()
|
||||
{
|
||||
@@ -111,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
||||
*/
|
||||
public function export($content)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$logfile = $this->getFilename();
|
||||
|
||||
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
|
||||
@@ -142,6 +149,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
||||
|
||||
fwrite($filefd, $message."\n");
|
||||
fclose($filefd);
|
||||
@chmod($logfile, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user