Skip to content

Commit a5684ea

Browse files
committed
fix(log): Log exception class when message is empty
Signed-off-by: Joas Schilling <[email protected]>
1 parent 36d370b commit a5684ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Log.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public function logException(Throwable $exception, array $context = []) {
344344
unset($data['app']);
345345
unset($data['level']);
346346
$data = array_merge($serializer->serializeException($exception), $data);
347-
$data = $this->interpolateMessage($data, $context['message'] ?? '--', 'CustomMessage');
347+
$data = $this->interpolateMessage($data, isset($context['message']) && $context['message'] !== '' ? $context['message'] : ('Exception thrown: ' . get_class($exception)), 'CustomMessage');
348348

349349

350350
array_walk($context, [$this->normalizer, 'format']);

0 commit comments

Comments
 (0)