changeset 4880:f64d13d9b76b

misc/lnav: Attempt at log format description for lnav The default lnav behavior often misidentifies messages with the word 'error' as errors, even in debug messages. This solves that.
author Kim Alvefur <zash@zash.se>
date Mon, 31 Jan 2022 11:51:50 +0100
parents 883d45d2082a
children 09b8144051ea
files misc/lnav/prosody.json
diffstat 1 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/lnav/prosody.json	Mon Jan 31 11:51:50 2022 +0100
@@ -0,0 +1,39 @@
+{
+   "$schema" : "https://lnav.org/schemas/format-v1.schema.json",
+   "prosody_log" : {
+      "body-field" : "message",
+      "description" : "The Prosody IM server log format",
+      "level" : {
+         "debug" : "^debug$",
+         "error" : "^error$",
+         "info" : "^info$",
+         "warning" : "^warn$"
+      },
+      "level-field" : "loglevel",
+      "multiline" : false,
+      "ordered-by-time" : true,
+      "regex" : {
+         "standard" : {
+            "pattern" : "^(?<timestamp>\\w{3} \\d{2} \\d{2}:\\d{2}:\\d{2})\\s+(?<loggername>\\S+)\\s+(?<loglevel>debug|info|warn|error)\\s+(?<message>.+)$"
+         }
+      },
+      "sample" : [
+         {
+            "line" : "Jan 31 11:07:34 c2s565063fff480\tinfo\tClient connected"
+         }
+      ],
+      "timestamp-field" : "timestamp",
+      "timestamp-format" : "%b %d %H:%M:%S ",
+      "title" : "Prosody log",
+      "url" : "https://prosody.im/doc/logging",
+      "value" : {
+         "loggername" : {
+            "identifier" : true,
+            "kind" : "string"
+         },
+         "payload" : {
+            "kind" : "xml"
+         }
+      }
+   }
+}