Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Resque\Logger class #77

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/resque
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ if($APP_INCLUDE) {
}

// See if the APP_INCLUDE containes a logger object,
// If none exists, fallback to internal logger
// If none exists, use the NullLogger instead, which
// effectively disables logging.
if (!isset($logger) || !is_object($logger)) {
$logger = new \Resque\Logger($logLevel);
$logger = new \Psr\Log\NullLogger();
}

$BLOCKING = getenv('BLOCKING') !== FALSE;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"require": {
"php": ">=5.6.0",
"colinmollenhour/credis": "~1.7",
"psr/log": "~1.0"
"psr/log": ">=1.1.0"
},
"suggest": {
"ext-pcntl": "REQUIRED for forking processes on platforms that support it (so anything but Windows).",
Expand Down
69 changes: 0 additions & 69 deletions lib/Logger.php

This file was deleted.

4 changes: 2 additions & 2 deletions lib/Worker/ResqueWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Resque\Worker;

use Resque\Logger;
use Resque\Resque;
use CredisException;
use Psr\Log\LogLevel;
use Psr\Log\NullLogger;
use Resque\Job\PID;
use Resque\Event;
use Resque\Exceptions\DirtyExitException;
Expand Down Expand Up @@ -91,7 +91,7 @@ class ResqueWorker
*/
public function __construct($queues)
{
$this->logger = new Logger();
$this->logger = new NullLogger();

if (!is_array($queues)) {
$queues = array($queues);
Expand Down
36 changes: 0 additions & 36 deletions test/Resque/Tests/LoggerTest.php

This file was deleted.

Loading