log des erreurs soap dans un fichier
This commit is contained in:
parent
f9ce6efe1f
commit
ad7d1cd9af
@ -36,6 +36,8 @@ function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
||||
$message.= 'tabInfo : '.print_r($tabInfo,true).'<br/><br/>';
|
||||
$message.= '</pre>';
|
||||
|
||||
logSoapFault($message);
|
||||
|
||||
if($debug == TRUE){
|
||||
print '<pre>';
|
||||
print $message;
|
||||
@ -61,19 +63,17 @@ function messageSoapFault(){
|
||||
* @param string $message
|
||||
* @return void
|
||||
*/
|
||||
function mailSoapFault($message){
|
||||
function mailSoapFault($message)
|
||||
{
|
||||
$mail = new PHPMailer();
|
||||
$mail->From = "contact@scores-decisions.com";
|
||||
$mail->FromName = "Serveur SD-13408";
|
||||
$mail->Host = "smtp.free.fr";
|
||||
$mail->Host = "localhost";
|
||||
$mail->Mailer = "smtp";
|
||||
$mail->Subject = "Erreur SOAP - (Date :".date("d")."/".date("m")."/".date("Y").")";
|
||||
$body = $message;
|
||||
$mail->MsgHTML($body);
|
||||
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
||||
if(!$mail->Send()) {
|
||||
//logSoapFault($mail->ErrorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -81,8 +81,10 @@ function mailSoapFault($message){
|
||||
* @param string $message
|
||||
* @return void
|
||||
*/
|
||||
function logSoapFault($message){
|
||||
echo $message;
|
||||
function logSoapFault($message)
|
||||
{
|
||||
$fichier = 'errorsoap-'.date('Y').date('m').date('d').date('H').date('i').date('s').'.txt';
|
||||
file_put_contents(PATH_DATA.'/log/'.$fichier, $message);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user