Skip to content

Commit

Permalink
Remove datetime from custom logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbjr committed Mar 25, 2024
1 parent be0ead1 commit bf958be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/LogRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ class LogRecord extends \Monolog\LogRecord
public function toArray(): array
{
$array = parent::toArray();

// Remove datetime
unset($array['datetime']);

// Add origin
return array_merge(['origin' => 'app.' . config('custom-logging.container_role')], $array);
}
}

0 comments on commit bf958be

Please sign in to comment.