Skip to content

Commit

Permalink
fix: provide default argument for logging context methods
Browse files Browse the repository at this point in the history
  • Loading branch information
eithed committed Dec 17, 2019
1 parent 69d43f7 commit 4f07bf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EventStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
}
Expand All @@ -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);
};

Expand All @@ -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',
Expand Down

0 comments on commit 4f07bf8

Please sign in to comment.