summaryrefslogtreecommitdiffstats
path: root/src/formats/glog_log.json
blob: 09fcff4dc017b82dbb23131524ba6f812f813b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"
            }
        ]
    }
}