More accurate log file

This commit is contained in:
Laurent Destailleur 2013-09-09 12:23:15 +02:00
parent 1df07a7d9c
commit d22985c5fa

View File

@ -114,7 +114,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
*/ */
public function export($content, $suffixinfilename='') public function export($content, $suffixinfilename='')
{ {
global $conf; global $conf, $dolibarr_main_prod;
$logfile = $this->getFilename($suffixinfilename); $logfile = $this->getFilename($suffixinfilename);
@ -127,7 +127,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
{ {
// Do not break dolibarr usage if log fails // Do not break dolibarr usage if log fails
//throw new Exception('Failed to open log file '.basename($logfile)); //throw new Exception('Failed to open log file '.basename($logfile));
print 'Failed to open log file '.basename($logfile); print 'Failed to open log file '.($dolibarr_main_prod?basename($logfile):$logfile);
} }
} }
else else