本文整理汇总了PHP中sfLogger::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP sfLogger::debug方法的具体用法?PHP sfLogger::debug怎么用?PHP sfLogger::debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfLogger
的用法示例。
在下文中一共展示了sfLogger::debug方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeRetrieveLogs
/**
* Webservice permettant la mise à jour des logs du jeu de test.
*
* @param sfWebRequest $request
* @return type
* @throws Exception
*/
public function executeRetrieveLogs(sfWebRequest $request)
{
$this->setLayout(false);
$this->getResponse()->setContentType('application/json');
$this->logger = sfContext::getInstance()->getLogger();
$statutPlaying = StatusConst::STATUS_PROCESSING_DB;
$statutOk = StatusConst::STATUS_OK_DB;
$statutKo = StatusConst::STATUS_KO_DB;
/** @var EiTestSetTable $tableJDT */
$tableJDT = Doctrine_Core::getTable("EiTestSet");
$synchronized = false;
try {
$this->getUrlParameters($request);
$JSONStr = $request->getParameter('logs');
$ei_log = Doctrine_Core::getTable('EiLog')->findOneByEiTestSetIdAndEiScenarioIdAndProfileIdAndProfileRefAndId($this->ei_test_set->getId(), $this->ei_scenario->getId(), $this->profile_id, $this->profile_ref, $request->getParameter('ei_log_id'));
$this->logger->debug($JSONStr);
$JSONArray = json_decode($JSONStr);
$ei_log_st = $statutPlaying;
$i = 0;
// Récupération de l'itération active selon le projet & profil.
$iterationActive = $this->ei_test_set->getEiIteration();
//***************************************************************************//
//***** PARCOURS DE LA LISTE DE FONCTIONS/LOGS EXECUTE(E)S JSON *****//
//***************************************************************************//
foreach ($JSONArray as $i => $data) {
/** @var EiTestSetFunction $test_set_function */
$test_set_function = Doctrine_Core::getTable('EiTestSetFunction')->findOneByPositionAndEiTestSetId($data->{'position'}, $this->ei_test_set->getId());
if (is_null($test_set_function)) {
throw new Exception($data->{'position'} . " not found.");
}
//si une fonction a le status KO, on met KO au log.
if ($data->{'resultat'} == $statutKo) {
$ei_log_st = $statutKo;
} elseif ($data->{'resultat'} == $statutOk) {
$ei_log_st = $statutOk;
}
//assignation des valeurs pour les logs de la dernière execution du jeu de test.
$test_set_function->setStatus($data->{'resultat'});
$test_set_function->setDateDebut($data->{'datedebut'});
$test_set_function->setDateFin($data->{'datefin'});
$test_set_function->setDuree($data->{'duree'});
//*************************************************//
//***** Création des logs d'execution *****//
//*************************************************//
$log = new EiLogFunction();
$log->setEiFonction($test_set_function->getEiFonction());
$log->setFunctionRef($test_set_function->getFunctionRef());
$log->setFunctionId($test_set_function->getFunctionId());
$log->setEiIteration($iterationActive);
$log->setEiLogId($ei_log->getId());
$log->setEiTestSetFunctionId($test_set_function->getId());
$log->setEiTestSetId($this->ei_test_set->getId());
$log->setEiScenarioId($this->ei_scenario->getId());
$log->setPosition($test_set_function->getPosition());
$log->setDateDebut($data->{'datedebut'});
$log->setDateFin($data->{'datefin'});
$log->setDuree($data->{'duree'});
$log->setStatus($ei_log_st);
//*******************************************************************//
//***** Création des logs des paramètres de la fonction *****//
//*******************************************************************//
$params = $test_set_function->getEiTestSetParams();
$paramsColl = new Doctrine_Collection('EiLogParam');
if ($params) {
foreach ($params as $p => $param) {
$paramLog = new EiLogParam();
$paramLog->setEiLogId($ei_log->getId());
$paramLog->setEiIteration($iterationActive);
$paramLog->setFunctionId($test_set_function->getFunctionId());
$paramLog->setFunctionRef($test_set_function->getFunctionRef());
$paramLog->setEiTestSetId($this->ei_test_set->getId());
$paramLog->setParamId($param->getParamId());
$paramLog->setParamValeur($param->getValeur());
$paramLog->setParamName($param->getEiFunctionHasParam()->getName());
$ei_param = Doctrine_Core::getTable('EiParam')->findOneByParamIdAndIdFonction($param->getParamId(), $test_set_function->getEiFonction()->getId());
$paramLog->setEiParam($ei_param);
$paramLog->setEiLogFunction($log);
$paramsColl->add($paramLog);
}
}
//*****************************************************************//
//***** Traitement des paramètres retournés par l'IDE *****//
//*****************************************************************//
foreach ($data->{"parameters"} as $paramName => $paramValue) {
//****************************************************************************//
//***** Recherche du paramètre de sortie dans la base de données *****//
//****************************************************************************//
/** @var EiFunctionHasParam $paramBD */
$paramBD = Doctrine_Core::getTable('EiFunctionHasParam')->findOneByFunctionRefAndFunctionIdAndNameAndParamType($test_set_function->getEiFonction()->getFunctionRef(), $test_set_function->getEiFonction()->getFunctionId(), $paramName, "OUT");
// On détermine le XPATH.
$xpathF = $test_set_function->getXpath();
$xpathF .= $xpathF == "/Root" ? "[1]" : "";
$paramsToUpdate = array();
//.........这里部分代码省略.........
示例2: debug
/**
* @param $message
*/
public function debug($message)
{
$this->logger->debug($message);
}