From 06a8ac6ff694301c8bc51169f6b86d16a7f5ea4e Mon Sep 17 00:00:00 2001 From: Roger Szabo Date: Fri, 10 Mar 2017 16:50:15 +0800 Subject: log user agent globally instead Signed-off-by: Roger Szabo --- lib/private/Log/File.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index be8b72b3a3f..b1acd0175c5 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -101,6 +101,7 @@ class File { } else { $user = '--'; } + $userAgent = ($request->getHeader('User-Agent') !== '') ? $request->getHeader('User-Agent') : '--'; $version = $config->getValue('version', ''); $entry = compact( 'reqId', @@ -112,6 +113,7 @@ class File { 'method', 'url', 'user', + 'userAgent', 'version' ); $entry = json_encode($entry); -- cgit v1.2.3