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 committed Nov 13, 2023
1 parent 36d370b commit a5684ea
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 @@ -344,7 +344,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 a5684ea

Please sign in to comment.