mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 05:32:20 +00:00
More verbose logging if a Job throws an exception
Presently, the logger just logs the primary error message with no stack trace of additional debugging information. Type casting the exception to a string gives a much efficient output and enables better debugging.
This commit is contained in:
parent
610c4dcdbf
commit
65288538e3
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ class Resque_Worker
|
|||
$job->perform();
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$this->logger->log(Psr\Log\LogLevel::CRITICAL, '{job} has failed {stack}', array('job' => $job, 'stack' => $e->getMessage()));
|
||||
g $this->logger->log(Psr\Log\LogLevel::CRITICAL, '{job} has failed {stack}', array('job' => $job, 'stack' => (string)$e);
|
||||
$job->fail($e);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue