Skip to content

Commit 8d829d8

Browse files
committed
Use Pst\Log\LoggerInterface instead of Illuminate\Log\LogManager.
1 parent 1c13ef8 commit 8d829d8

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/QueueServiceProvider.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@
44

55
use Illuminate\Cache\RateLimiter;
66
use Illuminate\Contracts\Debug\ExceptionHandler;
7-
use Illuminate\Log\LogManager;
7+
use Psr\Log\LoggerInterface;
88

99
class QueueServiceProvider extends \Illuminate\Queue\QueueServiceProvider
1010
{
1111
protected function registerWorker()
1212
{
1313
$this->app->singleton('queue.worker', function () {
1414
return new Worker(
15-
$this->app['queue'], $this->app['events'], $this->app[ExceptionHandler::class],
16-
$this->app['config']->get('queue.rateLimits'), $this->app[RateLimiter::class], $this->app[LogManager::class]
15+
$this->app['queue'],
16+
$this->app['events'],
17+
$this->app[ExceptionHandler::class],
18+
$this->app['config']->get('queue.rateLimits'),
19+
$this->app[RateLimiter::class],
20+
$this->app[LoggerInterface::class]
1721
);
1822
});
1923
}

src/Worker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Illuminate\Cache\RateLimiter;
66
use Illuminate\Contracts\Debug\ExceptionHandler;
77
use Illuminate\Contracts\Events\Dispatcher;
8-
use Illuminate\Log\LogManager;
98
use Illuminate\Queue\QueueManager;
9+
use Psr\Log\LoggerInterface;
1010

1111
class Worker extends \Illuminate\Queue\Worker
1212
{
@@ -21,15 +21,15 @@ class Worker extends \Illuminate\Queue\Worker
2121
private $rateLimiter;
2222

2323
/**
24-
* @var LogManager
24+
* @var LoggerInterface
2525
*/
2626
private $logger;
2727

2828
/**
2929
* @inheritDoc
3030
* @param array|null $rateLimits
3131
* @param RateLimiter $rateLimiter
32-
* @param LogManager $logger
32+
* @param LoggerInterface $logger
3333
*/
3434
public function __construct(QueueManager $manager, Dispatcher $events, ExceptionHandler $exceptions, $rateLimits, $rateLimiter, $logger)
3535
{

0 commit comments

Comments
 (0)