summaryrefslogtreecommitdiffstats
path: root/src/formats/glog_log.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/formats/glog_log.json')
-rw-r--r--src/formats/glog_log.json52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/formats/glog_log.json b/src/formats/glog_log.json
new file mode 100644
index 0000000..09fcff4
--- /dev/null
+++ b/src/formats/glog_log.json
@@ -0,0 +1,52 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "glog_log": {
+ "title": "Glog",
+ "description": "The google glog format.",
+ "url": "https://code.google.com/p/google-glog/",
+ "regex": {
+ "std": {
+ "pattern": "^(?<level>[IWECF])(?<timestamp>\\d{4} \\d{2}:\\d{2}:\\d{2}\\.\\d{6}) +(?<thread>\\d+) (?<src_file>[^:]+):(?<src_line>\\d+)\\] (?<body>.*)"
+ },
+ "std-with-year": {
+ "pattern": "^(?<level>[IWECF])(?<timestamp>\\d{8} \\d{2}:\\d{2}:\\d{2}\\.\\d{6}) +(?<thread>\\d+) (?<src_file>[^:]+):(?<src_line>\\d+)\\] (?<body>.*)"
+ }
+ },
+ "level-field": "level",
+ "level": {
+ "error": "E",
+ "warning": "W",
+ "info": "I",
+ "critical": "C",
+ "fatal": "F"
+ },
+ "opid-field": "thread",
+ "value": {
+ "thread": {
+ "kind": "integer",
+ "identifier": true,
+ "foreign-key": true
+ },
+ "src_file": {
+ "kind": "string",
+ "identifier": true
+ },
+ "src_line": {
+ "kind": "integer",
+ "foreign-key": true
+ }
+ },
+ "sample": [
+ {
+ "line": "E0517 15:04:22.619632 1952452992 logging_unittest.cc:253] Log every 3, iteration 19"
+ },
+ {
+ "line": "E0517 15:04:22.619632 52992 logging_unittest.cc:253] Log every 3, iteration 19"
+ },
+ {
+ "line": "I20200308 23:47:32.089828 400441 config.cc:27] Loading user configuration: /home/aesophor/.config/wmderland/config",
+ "level": "info"
+ }
+ ]
+ }
+} \ No newline at end of file