From 2b21ad761abff580cb420c6e5fb1df83c81e9f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Tue, 4 Apr 2017 10:12:41 +0200 Subject: [PATCH] Reorder the entries of the log for easier reading --- lib/private/AppFramework/Http/Request.php | 3 ++- lib/private/Log/Owncloud.php | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 9a7f5d93aa50..44da18d54c64 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -486,7 +486,8 @@ public function getId() { } if(empty($this->requestId)) { - $this->requestId = $this->secureRandom->generate(20); + $validChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + $this->requestId = $this->secureRandom->generate(20, $validChars); } return $this->requestId; diff --git a/lib/private/Log/Owncloud.php b/lib/private/Log/Owncloud.php index efe48c57cb61..ff6725b7f621 100644 --- a/lib/private/Log/Owncloud.php +++ b/lib/private/Log/Owncloud.php @@ -101,14 +101,14 @@ public static function write($app, $message, $level, $conditionalLogFile = null) } $entry = compact( 'reqId', - 'remoteAddr', - 'app', - 'message', 'level', 'time', + 'remoteAddr', + 'user', + 'app', 'method', 'url', - 'user' + 'message' ); $entry = json_encode($entry); if (!is_null($conditionalLogFile)) {