ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
class.ilLineFormatter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
31 {
35  public function format(LogRecord $record): string
36  {
37  if (isset($record["extra"]["trace"])) {
38  $trace = $record["extra"]["trace"];
39  unset($record["extra"]["trace"]);
40  $record = $record->with(
41  message: $trace . " " . $record["message"],
42  extra: $record["extra"]
43  );
44  }
45 
46  $record = $record->with(context: []);
47 
48  return parent::format($record);
49  }
50 }
Custom line formatter.
format(LogRecord $record)