From 1e7d924c61f312364827af1014e765d98e71ac05 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 2 May 2022 17:49:32 +0200 Subject: 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 --- lib/private/Log/LogDetails.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/private/Log') 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 * @author Christoph Wurst * @author Julius Härtl + * @author Thomas Citharel * * @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; } } -- cgit v1.2.3