loggerBase = $loggerBase; } /** * @inheritDoc */ public function log ($level, string|Stringable $message, array $context = []): void { $this->loggerBase->log($level, $message, $context); } /** * Log an exception * * @param Throwable $exception The exception * @param array $context The context (automatically add the exception in "throwable") * @param string $level The log level * * @return void */ public function exception (Throwable $exception, array $context = [], string $level = LogLevel::ERROR): void { $context['throwable'] = $exception; $this->log( $level, 'Exception [' . get_class($exception) . ']: ' . $exception->getMessage(), $context ); } }