From 86f08f59d6318a45a20b74e4b2b449ddc6882419 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 14 Jan 2016 10:38:53 +0100 Subject: use logException() to properly log the exception --- lib/private/backgroundjob/job.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private/backgroundjob') diff --git a/lib/private/backgroundjob/job.php b/lib/private/backgroundjob/job.php index 4c4da94d4fd..d666cfe085e 100644 --- a/lib/private/backgroundjob/job.php +++ b/lib/private/backgroundjob/job.php @@ -52,7 +52,8 @@ abstract class Job implements IJob { $this->run($this->argument); } catch (\Exception $e) { if ($logger) { - $logger->error('Error while running background job (class: ' . get_class($this) . ', arguments: ' . print_r($this->argument, true) . '): ' . $e->getMessage()); + $logger->error('Error while running background job (class: ' . get_class($this) . ', arguments: ' . print_r($this->argument, true) . ')'); + $logger->logException($e); } } } -- cgit v1.2.3