Changeset

3736:3784bbcbb8ff

mod_log_json: Prettify JSON for readability
author Kim Alvefur <zash@zash.se>
date Sun, 03 Nov 2019 14:47:00 +0100
parents 3735:06b640473cda
children 3737:49e65a7e9415
files mod_log_json/README.markdown
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_log_json/README.markdown	Sun Nov 03 14:45:23 2019 +0100
+++ b/mod_log_json/README.markdown	Sun Nov 03 14:47:00 2019 +0100
@@ -21,9 +21,25 @@
 suitable for mangling with tools like
 [`jq`](https://stedolan.github.io/jq/).
 
+Example (with whitespace and indentation for readability):
+
 ``` {.json}
-{"message":"Client connected","source":"c2s55f267f5b9d0","datetime":"2019-11-03T13:38:28Z","level":"info","args":[]}
-{"message":"load_roster: asked for: %s","source":"rostermanager","datetime":"2019-11-03T13:38:28Z","level":"debug","args":["user@example.net"]}
+{
+   "args" : [],
+   "datetime" : "2019-11-03T13:38:28Z",
+   "level" : "info",
+   "message" : "Client connected",
+   "source" : "c2s55f267f5b9d0"
+}
+{
+   "args" : [
+      "user@example.net"
+   ],
+   "datetime" : "2019-11-03T13:38:28Z",
+   "level" : "debug",
+   "message" : "load_roster: asked for: %s",
+   "source" : "rostermanager"
+}
 ```
 
 `datetime`