/** * @desc Returns string representation of throwable * * @return array */ public function getStringRepresentation() { if (!is_array($this->throwableArray)) { $renderer = new LoggerRendererException(); $this->throwableArray = explode("\n", $renderer->render($this->throwable)); } return $this->throwableArray; }
public function format(\LoggerLoggingEvent $event) { $format = parent::format($event); $throwableInfo = $event->getThrowableInformation(); if ($throwableInfo === null) { return $format; } $renderer = new \LoggerRendererException(); return $format . $renderer->render($throwableInfo->getThrowable()) . "\n"; }
/** * @desc Returns string representation of throwable * * @return array */ public function getStringRepresentation() { if (!is_array($this->throwableArray)) { $renderer = Logger::getHierarchy()->getRendererMap()->getByClassName(get_class($this->throwable)); // TODO: why this? if ($renderer instanceof LoggerRendererDefault) { $renderer = new LoggerRendererException(); } $this->throwableArray = explode("\n", $renderer->render($this->throwable)); } return $this->throwableArray; }