Merge pull request #197 from epicwhale/patch-1

More verbose logging if a Job throws an exception
This commit is contained in:
Chris Boulton 2016-08-15 18:42:37 -07:00 committed by GitHub
commit 08de86a41e

View File

@ -245,7 +245,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()));
$this->logger->log(Psr\Log\LogLevel::CRITICAL, '{job} has failed {stack}', array('job' => $job, 'stack' => $e));
$job->fail($e);
return;
}