summaryrefslogtreecommitdiffstats
path: root/apps/federation/lib/BackgroundJob
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-17 15:21:56 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-23 10:57:21 +0100
commit2a38605545e26ce68a37e5ebb877fd9c9875a37d (patch)
treea149433f3fdeae3b4615061b495e4c523328a9a6 /apps/federation/lib/BackgroundJob
parent520f2fd6ea3661d5d49517c7265dd8d7515036ac (diff)
downloadnextcloud-server-2a38605545e26ce68a37e5ebb877fd9c9875a37d.tar.gz
nextcloud-server-2a38605545e26ce68a37e5ebb877fd9c9875a37d.zip
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/federation/lib/BackgroundJob')
-rw-r--r--apps/federation/lib/BackgroundJob/GetSharedSecret.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
index 92bb31e369e..829e04ddb28 100644
--- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
@@ -201,10 +201,18 @@ class GetSharedSecret extends Job {
}
} catch (RequestException $e) {
$status = -1; // There is no status code if we could not connect
- $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
+ $this->logger->logException($e, [
+ 'message' => 'Could not connect to ' . $target,
+ 'level' => \OCP\Util::INFO,
+ 'app' => 'federation',
+ ]);
} catch (RingException $e) {
$status = -1; // There is no status code if we could not connect
- $this->logger->info('Could not connect to ' . $target, ['app' => 'federation']);
+ $this->logger->logException($e, [
+ 'message' => 'Could not connect to ' . $target,
+ 'level' => \OCP\Util::INFO,
+ 'app' => 'federation',
+ ]);
} catch (\Exception $e) {
$status = Http::STATUS_INTERNAL_SERVER_ERROR;
$this->logger->logException($e, ['app' => 'federation']);