aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-11-13 14:28:52 +0100
committerGitHub <noreply@github.com>2023-11-13 14:28:52 +0100
commit073ec6d217486e09e5526b78e3a463ceb7471ba3 (patch)
treebeeeeda05f99c297e2b6027aa9e4b85674bda6ab
parent4882d40a0c76794b5d82a53b103e297868594814 (diff)
parenta5684ea3d27bb5d6f7c16e2cbca7eff5d60c8615 (diff)
downloadnextcloud-server-073ec6d217486e09e5526b78e3a463ceb7471ba3.tar.gz
nextcloud-server-073ec6d217486e09e5526b78e3a463ceb7471ba3.zip
Merge pull request #41406 from nextcloud/bugfix/noid/log-exception-class-when-message-is-empty
fix(log): Log exception class when message is empty
-rw-r--r--lib/private/Log.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php
index d6750491d92..1784114911f 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -344,7 +344,7 @@ class Log implements ILogger, IDataLogger {
unset($data['app']);
unset($data['level']);
$data = array_merge($serializer->serializeException($exception), $data);
- $data = $this->interpolateMessage($data, $context['message'] ?? '--', 'CustomMessage');
+ $data = $this->interpolateMessage($data, isset($context['message']) && $context['message'] !== '' ? $context['message'] : ('Exception thrown: ' . get_class($exception)), 'CustomMessage');
array_walk($context, [$this->normalizer, 'format']);