summaryrefslogtreecommitdiffstats
path: root/test/formats/xmlmsg
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
commit5068d34c08f951a7ea6257d305a1627b09a95817 (patch)
tree08213e2be853396a3b07ce15dbe222644dcd9a89 /test/formats/xmlmsg
parentInitial commit. (diff)
downloadlnav-5068d34c08f951a7ea6257d305a1627b09a95817.tar.xz
lnav-5068d34c08f951a7ea6257d305a1627b09a95817.zip
Adding upstream version 0.11.1.upstream/0.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/formats/xmlmsg')
-rw-r--r--test/formats/xmlmsg/format.json73
1 files changed, 73 insertions, 0 deletions
diff --git a/test/formats/xmlmsg/format.json b/test/formats/xmlmsg/format.json
new file mode 100644
index 0000000..efd6f42
--- /dev/null
+++ b/test/formats/xmlmsg/format.json
@@ -0,0 +1,73 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "xml_msg_log": {
+ "title": "",
+ "description": "",
+ "regex": {
+ "std": {
+ "pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3})\\]\\s+(?<level>\\w+)\\s+\\[(?<module>[^:]*):(?<line>\\d+)\\]\\s*(?<body>[^\\n]*)\\n?(?<msg_data>.*)"
+ }
+ },
+ "level": {
+ "critical": "CRITICAL",
+ "error": "ERROR",
+ "warning": "WARNING",
+ "info": "INFO",
+ "debug": "DEBUG"
+ },
+ "value": {
+ "module": {
+ "kind": "string",
+ "identifier": true,
+ "description": "Python source module which emitted log entry",
+ "rewriter": ";SELECT ''"
+ },
+ "line": {
+ "kind": "integer",
+ "description": "Line number – in the module – where log entry was emitted"
+ },
+ "msg_data": {
+ "kind": "xml",
+ "rewriter": ";SELECT node_path FROM xpath('//*', :msg_data)"
+ }
+ },
+ "highlights": {
+ "client_id": {
+ "pattern": "(?<=>)\\d+(?=<\/client>)",
+ "color": "Orange1",
+ "underline": true
+ },
+ "reply_error": {
+ "pattern": "(?<=<result>)ERROR(?=</result>)",
+ "color": "Red1"
+ },
+ "request": {
+ "pattern": "<request[^>]*>",
+ "color": "Green"
+ },
+ "reply": {
+ "pattern": "<head[^>]*>",
+ "color": "Gold1"
+ }
+ },
+ "tags": {
+ "xml-req": {
+ "pattern": "Full request text:"
+ }
+ },
+ "sample": [
+ {
+ "line": "[2020-12-10 06:56:41,477] INFO [m:108] Calling 'x' with params:",
+ "level": "info"
+ },
+ {
+ "line": "[2020-12-10 06:56:41,092] DEBUG [m:69] Full request text:\n<?xml version='1.0' encoding='iso-8859-2'?>\n<a-request>\n <head>\n x\n </head>\n <source>\n x\n </source>\n <request>\n <name>\n x\n </name>\n </request>\n</a-request>\n",
+ "level": "debug"
+ },
+ {
+ "line": "[2020-12-10 06:56:41,099] DEBUG [m:85] Full reply text:\n<?xml version='1.0' encoding='iso-8859-2'?>\n<a-reply>\n <head>\n x\n </head>\n <reply>\n <status>\n <result>OK</result>\n </status>\n <name>\n x\n </name>\n </reply>\n <technical-track>\n x\n </technical-track>\n</a-reply>\n",
+ "level": "debug"
+ }
+ ]
+ }
+} \ No newline at end of file