Monolog\Logger::notice PHP Method

notice() public method

This method allows to have an easy ZF compatibility.
public notice ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
return boolean Whether the record has been processed
    public function notice($message, array $context = array())
    {
        return $this->addRecord(self::INFO, $message, $context);
    }

Usage Example

Exemplo n.º 1
0
 public function inspect()
 {
     $inspectionDto = new InspectionDto();
     $inspectionMessage = '';
     if ($this->createdTasksBeforeHandling !== $this->correctlyExecuted + count($this->executedWithError)) {
         $this->allTasksComplete = false;
         $inspectionMessage .= "Not all tasks complete: " . " created (before handling): " . $this->createdTasksBeforeHandling . " correctlyExecuted: " . serialize($this->getCorrectlyExecuted()) . " executedWithError: " . serialize($this->getExecutedWithError()) . $this->loggerPostfix;
     }
     $this->logger->notice("CreatedTasks before handling: " . serialize($this->createdTasksBeforeHandling));
     $this->logger->notice("CreatedTasks after handling: " . serialize($this->createdTasksNumber));
     $this->logger->notice("CorrectlyExecuted: " . serialize($this->getCorrectlyExecuted()));
     $this->logger->notice("Executed with error: " . serialize($this->executedWithError));
     if (!empty($this->executedWithError)) {
         switch ($this->attentionMethod) {
             case InspectorConstants::LOG:
                 $this->makeAttentionLog($inspectionMessage);
                 break;
             case InspectorConstants::MAIL:
                 $this->sendAttentionMail($inspectionMessage);
                 break;
             default:
                 $this->makeAttentionLog($inspectionMessage);
                 //$this->sendAttentionMail($inspectionMessage);
         }
     }
     $inspectionDto->setInspectionMessage($inspectionMessage);
     return $inspectionDto;
 }
All Usage Examples Of Monolog\Logger::notice