diff --git a/src/EventStore.php b/src/EventStore.php index eab037f..ea2eaad 100644 --- a/src/EventStore.php +++ b/src/EventStore.php @@ -51,7 +51,7 @@ public static function eventToClass(?callable $callback = null) */ public static function workerLogger(?callable $logger = null) { - static::$workerLogger = $logger ?: function($message, $context){ + static::$workerLogger = $logger ?: function($message, $context = []){ Log::info($message, $context); }; } @@ -64,7 +64,7 @@ public static function workerLogger(?callable $logger = null) */ public static function threadLogger(?callable $logger = null) { - static::$threadLogger = $logger ?: function($message, $context){ + static::$threadLogger = $logger ?: function($message, $context = []){ Log::channel('stdout')->info($message, $context); }; @@ -78,7 +78,7 @@ public static function threadLogger(?callable $logger = null) 'handler' => \Monolog\Handler\StreamHandler::class, 'formatter' => \Monolog\Formatter\LineFormatter::class, 'formatter_with' => [ - 'format' => "%message% %context%", + 'format' => "%message% %context%\n", ], 'with' => [ 'stream' => 'php://stdout',