forked from Wavyzz/dolibarr
NEW Website logs are now into a separated log file.
This commit is contained in:
@@ -1078,6 +1078,13 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
|||||||
// If syslog module enabled
|
// If syslog module enabled
|
||||||
if (empty($conf->syslog->enabled)) return;
|
if (empty($conf->syslog->enabled)) return;
|
||||||
|
|
||||||
|
// Check if we are into execution of code of a website
|
||||||
|
if (defined('USEEXTERNALSERVER') && ! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
|
||||||
|
global $website, $websitekey;
|
||||||
|
if (is_object($website) && ! empty($website->ref)) $suffixinfilename.='_website_'.$website->ref;
|
||||||
|
elseif (! empty($websitekey)) $suffixinfilename.='_website_'.$websitekey;
|
||||||
|
}
|
||||||
|
|
||||||
if ($ident < 0)
|
if ($ident < 0)
|
||||||
{
|
{
|
||||||
foreach ($conf->loghandlers as $loghandlerinstance)
|
foreach ($conf->loghandlers as $loghandlerinstance)
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ function dolSaveMasterFile($filemaster)
|
|||||||
|
|
||||||
$mastercontent = '<?php'."\n";
|
$mastercontent = '<?php'."\n";
|
||||||
$mastercontent .= '// File generated to link to the master file - DO NOT MODIFY - It is just an include'."\n";
|
$mastercontent .= '// File generated to link to the master file - DO NOT MODIFY - It is just an include'."\n";
|
||||||
$mastercontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) require_once '".DOL_DOCUMENT_ROOT."/master.inc.php';\n";
|
$mastercontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {\n";
|
||||||
|
$mastercontent .= " if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1);\n";
|
||||||
|
$mastercontent .= " require_once '".DOL_DOCUMENT_ROOT."/master.inc.php';\n";
|
||||||
|
$mastercontent .= "}\n";
|
||||||
$mastercontent .= '?>'."\n";
|
$mastercontent .= '?>'."\n";
|
||||||
$result = file_put_contents($filemaster, $mastercontent);
|
$result = file_put_contents($filemaster, $mastercontent);
|
||||||
if (!empty($conf->global->MAIN_UMASK))
|
if (!empty($conf->global->MAIN_UMASK))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/core/website.inc.php
|
* \file htdocs/core/website.inc.php
|
||||||
* \brief Common file loaded by all website pages (after master.inc.php). It set the new object $weblangs, using parameter 'l'.
|
* \brief Common file loaded by all website pages (after master.inc.php). It set the new object $weblangs, using parameter 'l'.
|
||||||
* This file is included in top of all container pages.
|
* This file is included in top of all container pages and is run only when a web page is called.
|
||||||
* The global variable $websitekey must be defined.
|
* The global variable $websitekey must be defined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user