';
print '';
diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php
index 8fdcb57dae3..f607bd2ea4f 100644
--- a/htdocs/install/inc.php
+++ b/htdocs/install/inc.php
@@ -61,11 +61,12 @@ define('DOL_DOCUMENT_ROOT','../');
// Forcage du log pour les install et mises a jour
$conf->syslog->enabled=1;
-define('SYSLOG_FILE','/tmp/dolibarr_install.log');
+$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
+if (file_exists('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
+else define('SYSLOG_FILE','/dolibarr_install.log');
define('SYSLOG_FILE_NO_ERROR',1);
-
// Forcage du parametrage PHP magic_quots_gpc (Sinon il faudrait a chaque POST, conditionner
// la lecture de variable par stripslashes selon etat de get_magic_quotes).
// En mode off (recommande il faut juste faire addslashes au moment d'un insert/update.
@@ -151,7 +152,8 @@ function pFooter($nonext=0,$setuplang='')
function dolibarr_install_syslog($message)
{
- dolibarr_syslog($message);
+ if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6);
+ dolibarr_syslog($message,constant('LOG_DEBUG'));
}
?>
\ No newline at end of file
diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php
index 54d6983d125..7aec87490f7 100644
--- a/htdocs/lib/functions.inc.php
+++ b/htdocs/lib/functions.inc.php
@@ -170,7 +170,8 @@ function dolibarr_syslog($message, $level=LOG_INFO)
if ($conf->syslog->enabled)
{
- if ($level > SYSLOG_LEVEL) return;
+ //print $level.' - '.$conf->global->SYSLOG_LEVEL.' - '.$conf->syslog->enabled;
+ if ($level > $conf->global->SYSLOG_LEVEL) return;
// Ajout user a la log
$login='???';
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 82f588ddb64..5f2dafe9354 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -35,17 +35,31 @@
define('DOL_VERSION','2.2-dev');
define('EURO',chr(128));
-// La fonction clearstatcache ne doit pas etre appelé de manière globale car ralenti.
+// La fonction clearstatcache ne doit pas etre appelée de manière globale car ralenti.
// Elle doit etre appelée uniquement par les pages qui ont besoin d'un cache fichier vidé
// comme par exemple document.php
//clearstatcache();
-// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL)
+// Definition des constantes syslog
if (function_exists("define_syslog_variables"))
{
define_syslog_variables();
}
-//error_reporting(E_ALL);
+else
+{
+ // Pour PHP sans syslog (comme sous Windows)
+ define('LOG_EMERG',0);
+ define('LOG_ALERT',1);
+ define('LOG_CRIT',2);
+ define('LOG_ERR',3);
+ define('LOG_WARNING',4);
+ define('LOG_NOTICE',5);
+ define('LOG_INFO',6);
+ define('LOG_DEBUG',7);
+}
+
+// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL)
+// error_reporting(E_ALL);
error_reporting(E_ALL ^ E_NOTICE);
// Test si install ok