summaryrefslogtreecommitdiffstats
path: root/lib/private/log.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-15 13:13:27 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-15 14:55:30 +0100
commitf6c4b10189c6d76d94b0b01a440a326e6346c301 (patch)
tree426a161abc4380cbcafed3052930d0f78a0299a7 /lib/private/log.php
parent86f08f59d6318a45a20b74e4b2b449ddc6882419 (diff)
downloadnextcloud-server-f6c4b10189c6d76d94b0b01a440a326e6346c301.tar.gz
nextcloud-server-f6c4b10189c6d76d94b0b01a440a326e6346c301.zip
Add message key to context of logException
Diffstat (limited to 'lib/private/log.php')
-rw-r--r--lib/private/log.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/log.php b/lib/private/log.php
index 6c1666a9d7f..addefe6e53d 100644
--- a/lib/private/log.php
+++ b/lib/private/log.php
@@ -285,6 +285,8 @@ class Log implements ILogger {
'Line' => $exception->getLine(),
);
$exception['Trace'] = preg_replace('!(login|checkPassword)\(.*\)!', '$1(*** username and password replaced ***)', $exception['Trace']);
- $this->error('Exception: ' . json_encode($exception), $context);
+ $msg = isset($context['message']) ? $context['message'] : 'Exception';
+ $msg .= ': ' . json_encode($exception);
+ $this->error($msg, $context);
}
}