Modification de la trace pour meilleur suivi dans logs

This commit is contained in:
Laurent Destailleur 2006-12-05 23:02:06 +00:00
parent cb5ae8ff6b
commit 98f73194c6
2 changed files with 110 additions and 109 deletions

View File

@ -38,6 +38,7 @@
class InterfaceUser class InterfaceUser
{ {
var $db; var $db;
var $error;
/** /**
* \brief Constructeur. * \brief Constructeur.
@ -91,7 +92,7 @@ class InterfaceUser
* \brief Fonction appelée lors du déclenchement d'un évènement Dolibarr. * \brief Fonction appelée lors du déclenchement d'un évènement Dolibarr.
* D'autres fonctions run_trigger peuvent etre présentes dans includes/triggers * D'autres fonctions run_trigger peuvent etre présentes dans includes/triggers
* \param action Code de l'evenement * \param action Code de l'evenement
* \param object Objet concerné * \param object Objet concern
* \param user Objet user * \param user Objet user
* \param lang Objet lang * \param lang Objet lang
* \param conf Objet conf * \param conf Objet conf
@ -105,7 +106,7 @@ class InterfaceUser
// Users // Users
if ($action == 'USER_CREATE') if ($action == 'USER_CREATE')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
dolibarr_syslog($conf->global->STOCK_USERSTOCK . ' '. $conf->global->STOCK_USERSTOCK_AUTOCREATE ); dolibarr_syslog($conf->global->STOCK_USERSTOCK . ' '. $conf->global->STOCK_USERSTOCK_AUTOCREATE );
if ($conf->global->STOCK_USERSTOCK == 1 && $conf->global->STOCK_USERSTOCK_AUTOCREATE == 1) if ($conf->global->STOCK_USERSTOCK == 1 && $conf->global->STOCK_USERSTOCK_AUTOCREATE == 1)
{ {
@ -120,21 +121,21 @@ class InterfaceUser
} }
elseif ($action == 'USER_MODIFY') elseif ($action == 'USER_MODIFY')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
} }
elseif ($action == 'USER_NEW_PASSWORD') elseif ($action == 'USER_NEW_PASSWORD')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
} }
elseif ($action == 'USER_DISABLE') elseif ($action == 'USER_DISABLE')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
} }
else else
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' was ran but no handler found for this action."); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
return -1; return -1;
} }
return 0; return 0;

View File

@ -204,7 +204,7 @@ class InterfaceWebCal
} }
elseif ($action == 'PROPAL_CLOSE_SIGNED') elseif ($action == 'PROPAL_CLOSE_SIGNED')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -215,7 +215,7 @@ class InterfaceWebCal
} }
elseif ($action == 'PROPAL_CLOSE_REFUSED') elseif ($action == 'PROPAL_CLOSE_REFUSED')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -227,7 +227,7 @@ class InterfaceWebCal
elseif ($action == 'BILL_VALIDATE') elseif ($action == 'BILL_VALIDATE')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -238,7 +238,7 @@ class InterfaceWebCal
} }
elseif ($action == 'BILL_PAYED') elseif ($action == 'BILL_PAYED')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -249,7 +249,7 @@ class InterfaceWebCal
} }
elseif ($action == 'BILL_CANCELED') elseif ($action == 'BILL_CANCELED')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -261,7 +261,7 @@ class InterfaceWebCal
// Payments // Payments
elseif ($action == 'PAYMENT_CUSTOMER_CREATE') elseif ($action == 'PAYMENT_CUSTOMER_CREATE')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();
@ -273,7 +273,7 @@ class InterfaceWebCal
} }
elseif ($action == 'PAYMENT_SUPPLIER_CREATE') elseif ($action == 'PAYMENT_SUPPLIER_CREATE')
{ {
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched"); dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other"); $langs->load("other");
$this->date=time(); $this->date=time();