Improve record_log() : use noalyss/log and apache log
This commit is contained in:
parent
59ab697bb7
commit
169820ae43
22 changed files with 35 additions and 34 deletions
|
|
@ -33,7 +33,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ if ($op=='folder_add') // operation
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$content=_('Erreur paramètre');
|
||||
$status="NOK";
|
||||
return;
|
||||
|
|
@ -104,7 +104,7 @@ if ($op=='folder_remove') // operation
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$content=_('Erreur paramètre');
|
||||
$status="NOK";
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ if ($op=='folder_display') // operation
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$content=_('Erreur paramètre');
|
||||
$status="NOK";
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$content=_('Erreur paramètre');
|
||||
$status="NOK";
|
||||
//----------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ try
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ try
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
ob_start();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ try
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ try {
|
|||
$gDossier = dossier::id();
|
||||
|
||||
} catch (Exception $exc) {
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ try
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ switch ($action)
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$answer['message']=$exc->getMessage();
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ switch ($action)
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$answer['message']=$exc->getMessage();
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class Action_Document_Type_MTable extends Manage_Table_SQL
|
|||
$cn->rollback();
|
||||
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class Document_Export
|
|||
$zip=new Zip_Extended();
|
||||
$res=$zip->open("{$this->store_pdf}/result.zip",ZipArchive::CREATE);
|
||||
if ($res !== true) {
|
||||
error_log("ERR-DE89 cannot create zip file");
|
||||
record_log("ERR-DE89 cannot create zip file");
|
||||
record_log($this);
|
||||
throw new Exception ("ERR-DE89 cannot recreate zip");
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ class Document_Export
|
|||
// addGmpn
|
||||
$res=$zip->add_file_pattern($this->store_pdf,"/.*pdf/");
|
||||
if ($res == 0) {
|
||||
error_log("ERR-DE96 aucun fichier trouvé");
|
||||
record_log("ERR-DE96 aucun fichier trouvé");
|
||||
record_log($this);
|
||||
throw new Exception ( "ERR-DE96 cannot recreate zip");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ class Lettering
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$this->db->rollback();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ try {
|
|||
$to_poste = $http->request("to_poste");
|
||||
$p_filter = $http->request("p_filter", "string");
|
||||
} catch (Exception $exc) {
|
||||
error_log("Missing parameters");
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log("Missing parameters");
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
throw $exc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ try
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
throw $exc;
|
||||
}
|
||||
$l_type = "JRN";
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ try
|
|||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ function echo_error($p_log, $p_line="", $p_message="")
|
|||
{
|
||||
$msg="ERREUR :" . $p_log . " " . $p_line . " " . $p_message;
|
||||
echo $msg;
|
||||
syslog(LOG_ERR,$msg);
|
||||
record_log($msg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if ( isset($_POST['mod_exercice_label_bt'])) {
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo_warning( $exc->getMessage());
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc);
|
||||
$cn->rollback();
|
||||
}
|
||||
|
||||
|
|
@ -109,6 +109,7 @@ if (isset($_POST['add_exercice']))
|
|||
catch (Exception $ex)
|
||||
{
|
||||
echo_warning($ex->getMessage());
|
||||
record_log($exc);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ elseif ($action=="send_email") :
|
|||
$user_password=$exist_request[0]['password'];
|
||||
/* if too many request , there is a bug somewhere , so record an warning */
|
||||
if ( count($exist_request)> 1 ){
|
||||
error_log("WRE109 Trop de request pour ".var_export($exist_request,true));
|
||||
record_log("WRE109 Trop de request pour ".var_export($exist_request,true));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class Acc_ComputeTest extends TestCase
|
|||
catch (Exception $exc)
|
||||
{
|
||||
echo $exc->getMessage();
|
||||
error_log($exc->getTraceAsString());
|
||||
record_log($exc->getTraceAsString());
|
||||
$this->assertTrue(FALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue