diff options
Diffstat (limited to 'lib/private/Log/LogDetails.php')
-rw-r--r-- | lib/private/Log/LogDetails.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php index 2eea17ad73d..b1dc6e4311b 100644 --- a/lib/private/Log/LogDetails.php +++ b/lib/private/Log/LogDetails.php @@ -80,6 +80,16 @@ abstract class LogDetails { 'userAgent', 'version' ); + + if(is_array($message) && !array_key_exists('Exception', $message)) { + // Exception messages should stay as they are, + // anything else modern is split to 'message' (string) and + // data (array) fields + $shortMessage = $message['message'] ?? '(no message provided)'; + $entry['data'] = $message; + $entry['message'] = $shortMessage; + } + return $entry; } |