Mercurial > prosody-modules
diff mod_log_json/README.markdown @ 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 | 06b640473cda |
children | e43a82ddde12 |
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`