diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-05-02 17:49:32 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-05-02 19:29:35 +0200 |
commit | 1e7d924c61f312364827af1014e765d98e71ac05 (patch) | |
tree | 1549d0fe92e7bba7dfb700b82797ac355bff7b7f /lib/private/Log | |
parent | 3197ae83a4e85b1d26c8df7e5af04d50e89bd539 (diff) | |
download | nextcloud-server-1e7d924c61f312364827af1014e765d98e71ac05.tar.gz nextcloud-server-1e7d924c61f312364827af1014e765d98e71ac05.zip |
Fix logging data context to file
It was only logged when an exception was provided or when using
logData (which is not being much used).
We make sure the interpolated parameters are not logged.
Only tested with file write logger, but shouldn't work differently.
Crash reporters always had the context.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/LogDetails.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Log/LogDetails.php b/lib/private/Log/LogDetails.php index 3353ea3f4cc..b3544572708 100644 --- a/lib/private/Log/LogDetails.php +++ b/lib/private/Log/LogDetails.php @@ -5,6 +5,7 @@ * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Julius Härtl <jus@bitgrid.net> + * @author Thomas Citharel <nextcloud@tcit.fr> * * @license GNU AGPL version 3 or any later version * @@ -90,8 +91,9 @@ abstract class LogDetails { $entry['exception'] = $message; $entry['message'] = $message['CustomMessage'] !== '--' ? $message['CustomMessage'] : $message['Message']; } else { - $entry['data'] = $message; $entry['message'] = $message['message'] ?? '(no message provided)'; + unset($message['message']); + $entry['data'] = $message; } } |