From bf958be788e4b7d70fe180c2b9fec153e11e395a Mon Sep 17 00:00:00 2001 From: Chris Bautista Date: Mon, 25 Mar 2024 08:47:37 +0800 Subject: [PATCH] Remove datetime from custom logs --- src/LogRecord.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LogRecord.php b/src/LogRecord.php index 903b19b..ccfbc01 100644 --- a/src/LogRecord.php +++ b/src/LogRecord.php @@ -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); } }