New: syslog is configured on document directory by default. This make enabled module easier for unexperienced users.

This commit is contained in:
Laurent Destailleur
2008-04-19 20:57:29 +00:00
parent 3994341a3c
commit c5898b74b0
4 changed files with 10 additions and 10 deletions

View File

@@ -151,8 +151,10 @@ function dolibarr_syslog($message, $level=LOG_INFO)
if (defined("SYSLOG_FILE") && SYSLOG_FILE)
{
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen(SYSLOG_FILE,"a+");
else $file=fopen(SYSLOG_FILE,"a+");
$filelog=SYSLOG_FILE;
$filelog=eregi_replace('DOL_DATA_ROOT',DOL_DATA_ROOT,$filelog);
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen($filelog,"a+");
else $file=fopen($filelog,"a+");
if ($file)
{
$ip='unknown_ip';
@@ -178,7 +180,7 @@ function dolibarr_syslog($message, $level=LOG_INFO)
elseif (! defined("SYSLOG_FILE_NO_ERROR"))
{
$langs->load("main");
print $langs->trans("ErrorFailedToOpenFile",SYSLOG_FILE);
print $langs->trans("ErrorFailedToOpenFile",$filelog);
}
}
else