diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-01-28 13:00:13 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-01-28 13:00:13 +0100 |
commit | e00844488709552febdc07c19bed4c7ceb52a98d (patch) | |
tree | 44812e00bc9061fca2c2393b17982bdce3cf6f71 /lib/private/Log.php | |
parent | 46aaeb45612e20b6f460396533faf7f26ed1d6f7 (diff) | |
download | nextcloud-server-e00844488709552febdc07c19bed4c7ceb52a98d.tar.gz nextcloud-server-e00844488709552febdc07c19bed4c7ceb52a98d.zip |
always require a message paramter for data logging
also ensure it plays well with current log reader
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Log.php')
-rw-r--r-- | lib/private/Log.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php index 8d51a673a46..d288e724179 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -340,7 +340,7 @@ class Log implements ILogger, IDataLogger { } } - public function logData(array $data, array $context = []): void { + public function logData(string $message, array $data, array $context = []): void { $app = $context['app'] ?? 'no app in context'; $level = $context['level'] ?? ILogger::ERROR; @@ -350,6 +350,7 @@ class Log implements ILogger, IDataLogger { try { if ($level >= $minLevel) { + $data['message'] = $message; if (!$this->logger instanceof IFileBased) { $data = json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_UNESCAPED_SLASHES); } |