- $formattedLog = $this->formatLog($level, $message, $context);
- $this->write($level, $formattedLog);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function emergency($message, array $context = array())
- {
- $this->addEntry(LOG_EMERG, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function alert($message, array $context = array())
- {
- $this->addEntry(LOG_ALERT, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function critical($message, array $context = array())
- {
- $this->addEntry(LOG_CRIT, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function error($message, array $context = array())
- {
- $this->addEntry(LOG_ERR, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function warning($message, array $context = array())
- {
- $this->addEntry(LOG_WARNING, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function notice($message, array $context = array())
- {
- $this->addEntry(LOG_NOTICE, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function info($message, array $context = array())
- {
- $this->addEntry(LOG_INFO, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function debug($message, array $context = array())
- {
- $this->addEntry(LOG_DEBUG, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- * @throws InternalServerErrorException if the syslog isn't available
- */
- public function log($level, $message, array $context = array())
- {
- $logLevel = $this->mapLevelToPriority($level);
- $this->addEntry($logLevel, $message, $context);