Skip to content

Commit b93e4e0

Browse files
committed
Queue logger.
1 parent efb3271 commit b93e4e0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/QueueServiceProvider.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
class QueueServiceProvider extends \Illuminate\Queue\QueueServiceProvider
1010
{
11+
public function register()
12+
{
13+
$this->registerLogger();
14+
parent::register();
15+
}
16+
1117
protected function registerWorker()
1218
{
1319
$this->app->singleton('queue.worker', function () {
@@ -22,8 +28,14 @@ protected function registerWorker()
2228
$isDownForMaintenance,
2329
$this->app['config']->get('queue.rateLimits'),
2430
$this->app[RateLimiter::class],
25-
$this->app[LoggerInterface::class]
31+
$this->app['queue.logger']
2632
);
2733
});
2834
}
35+
36+
protected function registerLogger() {
37+
$this->app->singleton('queue.logger', function () {
38+
return $this->app[LoggerInterface::class];
39+
});
40+
}
2941
}

0 commit comments

Comments
 (0)