Enregistrement des logs dans le repertoire data

This commit is contained in:
Michael RICOIS 2012-04-23 15:07:19 +00:00
parent ada634bdb1
commit de6f69439a
2 changed files with 4 additions and 4 deletions

View File

@ -44,11 +44,13 @@ class IndexController extends Zend_Controller_Action
$ws = new WsScores();
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
$log = Zend_Registry::get('configuration')->path->data.'/log/altisys.log';
if ($reponse === false){
file_put_contents('altisys.log', date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ERREUR\n", FILE_APPEND);
echo "Erreur";
} elseif (!empty($reponse->result->Url)) {
file_put_contents('altisys.log', date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
file_put_contents($log, date('Y-m-d H:i:s')." - URL = ".$reponse->result->Url."\n", FILE_APPEND);
echo $reponse->result->Url;
}
}

View File

@ -19,7 +19,5 @@ if (!empty($login) && !empty($hach)){
$url = $url.'?'.$login.'&'.$hach;
}
file_put_contents('altisys.log', date('Y-m-d H:i:s')." - Connexion ".$_REQUEST['login']."\n", FILE_APPEND);
header( "Location: $url" );
exit;