summaryrefslogtreecommitdiffstats
path: root/test/formats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/formats/jsontest/format.json13
-rw-r--r--test/formats/jsontest/lnav-logstash.json56
-rw-r--r--test/formats/jsontest/rewrite-user.lnav3
-rw-r--r--test/formats/partitions/format.json11
4 files changed, 58 insertions, 25 deletions
diff --git a/test/formats/jsontest/format.json b/test/formats/jsontest/format.json
index 333b8a9..63148ea 100644
--- a/test/formats/jsontest/format.json
+++ b/test/formats/jsontest/format.json
@@ -15,6 +15,15 @@
"field": "lvl",
"auto-width": true
},
+ {
+ "field": "logger",
+ "prefix": " <",
+ "suffix": ">",
+ "min-width": 20,
+ "max-width": 20,
+ "overflow": "abbrev",
+ "default-value": ""
+ },
" ",
{
"field": "msg"
@@ -33,6 +42,10 @@
"obj": {
"kind": "json"
},
+ "logger": {
+ "kind": "string",
+ "identifier": true
+ },
"lvl": {
"kind": "string",
"hidden": true
diff --git a/test/formats/jsontest/lnav-logstash.json b/test/formats/jsontest/lnav-logstash.json
index 27f9239..b821168 100644
--- a/test/formats/jsontest/lnav-logstash.json
+++ b/test/formats/jsontest/lnav-logstash.json
@@ -7,40 +7,48 @@
"json": true,
"hide-extra": false,
"file-pattern": "\\.clog.*",
- "multiline": false,
"line-format": [
- { "field" : "@timestamp" },
+ {
+ "field": "@timestamp"
+ },
" ",
- { "field" : "ipaddress" },
+ {
+ "field": "ipaddress"
+ },
" ",
- { "field" : "message" },
+ {
+ "field": "message"
+ },
" ",
- { "field" : "stack_trace", "default-value" : "" }
+ {
+ "field": "stack_trace",
+ "default-value": ""
+ }
],
- "timestamp-field" : "@timestamp",
- "body-field" : "message",
- "level-field" : "level",
- "level" : {
- "trace" : "TRACE",
- "debug" : "DEBUG",
- "info" : "INFO",
- "error" : "ERROR",
- "warning" : "WARN"
+ "timestamp-field": "@timestamp",
+ "body-field": "message",
+ "level-field": "level",
+ "level": {
+ "trace": "TRACE",
+ "debug": "DEBUG",
+ "info": "INFO",
+ "error": "ERROR",
+ "warning": "WARN"
},
- "value" : {
- "logger_name" : {
- "kind" : "string",
- "identifier" : true
+ "value": {
+ "logger_name": {
+ "kind": "string",
+ "identifier": true
},
- "ipaddress" : {
- "kind" : "string",
- "identifier" : true
+ "ipaddress": {
+ "kind": "string",
+ "identifier": true
},
- "level_value" : {
+ "level_value": {
"hidden": true
},
- "stack_trace" : {
- "kind" : "string"
+ "stack_trace": {
+ "kind": "string"
}
}
}
diff --git a/test/formats/jsontest/rewrite-user.lnav b/test/formats/jsontest/rewrite-user.lnav
index e34aa78..56ff500 100644
--- a/test/formats/jsontest/rewrite-user.lnav
+++ b/test/formats/jsontest/rewrite-user.lnav
@@ -1,2 +1,3 @@
-;SELECT 'mailto:' || :user
+;SELECT 'mailto:' || :user AS mt
+:echo $mt
diff --git a/test/formats/partitions/format.json b/test/formats/partitions/format.json
new file mode 100644
index 0000000..971c542
--- /dev/null
+++ b/test/formats/partitions/format.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "syslog_log": {
+ "partitions": {
+ "dhclient-binding": {
+ "description": "Set partition name to current IP",
+ "pattern": " bound to ([^ ]+) --"
+ }
+ }
+ }
+} \ No newline at end of file