Skip to content

Commit

Permalink
correction niveau de log (passage de info à debug)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrousseauDigitick committed Feb 19, 2018
1 parent cc7a5b3 commit 21a14bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Digitick/Foundation/Fuse/Handler/CommandHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ public function execute (AbstractCommand $command) {
try {
$result = $this->executeCommand($command);

$this->log(LogLevel::INFO, "Success for command group " . $command->getKey());
$this->log(LogLevel::DEBUG, "Success for command group " . $command->getKey());
$this->circuitBreaker->reportSuccess($command->getKey());
if ($isCacheable) {
$this->log(LogLevel::DEBUG, "Store result in cache. Key = $cacheKey");
$this->cacheManager->set($cacheKey, $result, $command->getTtl());
}
} catch (LogicException $exc) {
$this->log(LogLevel::DEBUG, "Logic exception. Call onLogicError");
$this->log(LogLevel::INFO, "Success for command group " . $command->getKey());
$this->circuitBreaker->reportSuccess($commaqnd->getKey());
$this->log(LogLevel::ERROR, "Logic exception. Call onLogicError");
$this->log(LogLevel::ERROR, "Failure for command group " . $command->getKey());
$this->circuitBreaker->reportSuccess($command->getKey());
return $command->onLogicError($exc);
} catch (ServiceException $exc) {
$this->log(LogLevel::DEBUG, "Service exception. Call onServiceError");
$this->log(LogLevel::ERROR, "Service exception. Call onServiceError");
$this->log(LogLevel::ERROR, "Failure for command group " . $command->getKey());
$this->circuitBreaker->reportFailure($command->getKey());
return $command->onServiceError($exc);
Expand Down

0 comments on commit 21a14bc

Please sign in to comment.