summaryrefslogtreecommitdiffstats
path: root/src/formats/error_log.json
blob: d3a94ad5801aa6d6626856de1e0a2e6d615c28f0 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
    "$schema": "https://lnav.org/schemas/format-v1.schema.json",
    "error_log": {
        "title": "Common Error Log",
        "description": "The default web error log format for servers like Apache.",
        "regex": {
            "cups": {
                "pattern": "^(?<level>\\w) \\[(?<timestamp>[^\\]]+)\\] (?<body>.*)"
            },
            "apache": {
                "pattern": "^\\[(?<timestamp>[^\\]]+)\\] \\[(?:(?<module>[^:]+):)?(?<level>\\w+)\\](?: \\[pid (?<pid>\\d+)(:tid (?<tid>\\d+))?\\])?(?: \\[client (?<c_ip>[\\w\\.:\\-]+):(?<c_port>\\d+)\\])? (?<body>.*)"
            }
        },
        "level-field": "level",
        "value": {
            "module": {
                "kind": "string",
                "identifier": true
            },
            "pid": {
                "kind": "integer",
                "identifier": true
            },
            "tid": {
                "kind": "integer",
                "identifier": true,
                "description": "The thread id"
            },
            "c_ip": {
                "kind": "string",
                "collate": "ipaddress",
                "identifier": true,
                "description": "The client IP address"
            },
            "c_port": {
                "kind": "integer",
                "identifier": true
            }
        },
        "sample": [
            {
                "line": "E [08/Jun/2013:11:28:58 -0700] Unknown directive BrowseOrder on line 22 of /private/etc/cups/cupsd.conf.",
                "level": "error"
            },
            {
                "line": "[Tue Apr 04 06:18:29.712806 2017] [mpm_prefork:notice] [pid 17725] AH00163: Apache/2.4.23 (Unix) configured -- resuming normal operations",
                "level": "notice"
            },
            {
                "line": "[Tue Apr 04 06:28:08.605341 2017] [core:error] [pid 17962] [client 127.0.0.1:60444] AH00135: Invalid method in request FOO /",
                "level": "error"
            },
            {
                "line": "[Thu Jan 17 02:42:49 2013] [notice] Digest: generating secret for digest authentication ...",
                "level": "notice"
            },
            {
                "line": "[Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico",
                "level": "error"
            },
            {
                "line": "[Thu Jan 02 22:23:07.368853 2020] [http:info] [pid 4784:tid 139701043291904] [client 66.220.149.10:45948] AH01593: chunked Transfer-Encoding forbidden: /",
                "level": "info"
            }
        ]
    }
}