- * @param int $level
- * @param string $message
- * @param array $context
- *
- * @throws InternalServerErrorException if the syslog isn't available
- */
- private function addEntry($level, $message, $context = [])
- {
- if ($level >= $this->logLevel) {
- return;
- }
-
- $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