Skip to content

Commit

Permalink
fix(log): Log exception class when message is empty
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed Nov 13, 2023
1 parent a61c609 commit 32ada27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function logException(Throwable $exception, array $context = []) {
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']);
Expand Down

0 comments on commit 32ada27

Please sign in to comment.