forked from Wavyzz/dolibarr
Amlioration des logs
This commit is contained in:
@@ -962,7 +962,8 @@ class Form
|
|||||||
|
|
||||||
if (sizeof($this->cache_conditions_paiements_code)) return 0; // Cache d<>ja charg<72>
|
if (sizeof($this->cache_conditions_paiements_code)) return 0; // Cache d<>ja charg<72>
|
||||||
|
|
||||||
dolibarr_syslog('html.form.class.php::load_cache_conditions_paiements');
|
//dolibarr_syslog('html.form.class.php::load_cache_conditions_paiements',LOG_DEBUG);
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, libelle";
|
$sql = "SELECT rowid, code, libelle";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."cond_reglement";
|
$sql.= " FROM ".MAIN_DB_PREFIX."cond_reglement";
|
||||||
$sql.= " WHERE active=1";
|
$sql.= " WHERE active=1";
|
||||||
@@ -1000,7 +1001,8 @@ class Form
|
|||||||
|
|
||||||
if (sizeof($this->cache_types_paiements_code)) return 0; // Cache d<>ja charg<72>
|
if (sizeof($this->cache_types_paiements_code)) return 0; // Cache d<>ja charg<72>
|
||||||
|
|
||||||
dolibarr_syslog('html.form.class.php::load_cache_types_paiements');
|
//dolibarr_syslog('html.form.class.php::load_cache_types_paiements',LOG_DEBUG);
|
||||||
|
|
||||||
$sql = "SELECT id, code, libelle, type";
|
$sql = "SELECT id, code, libelle, type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_paiement";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_paiement";
|
||||||
$sql.= " WHERE active > 0";
|
$sql.= " WHERE active > 0";
|
||||||
|
|||||||
@@ -161,13 +161,19 @@ function sanitize_string($str)
|
|||||||
fautes de protection m<>moire. Pour r<>soudre, utiliser le loggage fichier,
|
fautes de protection m<>moire. Pour r<>soudre, utiliser le loggage fichier,
|
||||||
au lieu du loggage syslog (configuration du module).
|
au lieu du loggage syslog (configuration du module).
|
||||||
Si SYSLOG_FILE_NO_ERROR d<>fini, on ne g<>re pas erreur ecriture log
|
Si SYSLOG_FILE_NO_ERROR d<>fini, on ne g<>re pas erreur ecriture log
|
||||||
|
\remarks On windows LOG_ERROR=4, LOG_WARNING=5, LOG_NOTICE=LOG_DEBUG=6
|
||||||
*/
|
*/
|
||||||
function dolibarr_syslog($message, $level=LOG_ERR)
|
function dolibarr_syslog($message, $level=LOG_INFO)
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
|
|
||||||
if ($conf->syslog->enabled)
|
if ($conf->syslog->enabled)
|
||||||
{
|
{
|
||||||
|
// Change this to LOg_DEBUG to see all messages on *nix
|
||||||
|
$level_maximum = LOG_INFO;
|
||||||
|
|
||||||
|
if ($level > $level_maximum) return;
|
||||||
|
|
||||||
// Ajout user a la log
|
// Ajout user a la log
|
||||||
$login='???';
|
$login='???';
|
||||||
if (is_object($user) && $user->id) $login=$user->login;
|
if (is_object($user) && $user->id) $login=$user->login;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class Translate {
|
|||||||
*/
|
*/
|
||||||
function setPhpLang()
|
function setPhpLang()
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Translate::set_php_lang: ".$this->defaultlang);
|
//dolibarr_syslog("Translate::set_php_lang: ".$this->defaultlang,LOG_DEBUG);
|
||||||
|
|
||||||
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
||||||
setlocale(LC_ALL, $this->defaultlang); // Compenser pb de locale avec windows
|
setlocale(LC_ALL, $this->defaultlang); // Compenser pb de locale avec windows
|
||||||
|
|||||||
Reference in New Issue
Block a user