- private function addEntry($level, $message, $context = [])
- {
- if ($level >= $this->logLevel) {
- return;
- }
-
- $formattedLog = $this->formatLog($level, $message, $context);
- $this->write($level, $formattedLog);
- }
-
- /**
- * {@inheritdoc}
- */
- public function emergency($message, array $context = array())
- {
- $this->addEntry(LOG_EMERG, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function alert($message, array $context = array())
- {
- $this->addEntry(LOG_ALERT, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function critical($message, array $context = array())
- {
- $this->addEntry(LOG_CRIT, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function error($message, array $context = array())
- {
- $this->addEntry(LOG_ERR, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function warning($message, array $context = array())
- {
- $this->addEntry(LOG_WARNING, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function notice($message, array $context = array())
- {
- $this->addEntry(LOG_NOTICE, $message, $context);
- }
-
- /**
- * {@inheritdoc}
- */
- public function info($message, array $context = array())