6 use Monolog\Formatter\LineFormatter;
17 public function format(LogRecord $record): string {
22 return parent::format($record);
25 $dt = new \DateTimeImmutable();
28 $message =
"Exception at time {$dt->getTimestamp()}:{$eol}{$exception->getMessage()}{$eol}";
29 $record_message = preg_replace(
'~\R~u', $eol,
$message);
38 return parent::format(
new LogRecord(
$dt, $record->channel, $record->level, $record_message,
$context, $record->extra, $record->formatted));
A generic parent class for database exceptions.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.