summaryrefslogtreecommitdiffstats
path: root/src/formats/cups_log.json
blob: b79f6363e5572b6098a15e730fe62a32861bccee (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
{
    "$schema": "https://lnav.org/schemas/format-v1.schema.json",
    "cups_log": {
        "title": "CUPS log format",
        "description": "Log format used by the Common Unix Printing System",
        "regex": {
            "system": {
                "pattern": "^(?<level>[IEW]) \\[(?<timestamp>\\d{2}/\\S{3,8}/\\d{4}:\\d{2}:\\d{2}:\\d{2} [+-]\\d{2,4})\\] (?<section>\\w+): (?<body>.*)$"
            },
            "default": {
                "pattern": "^(?<level>[IEW]) \\[(?<timestamp>\\d{2}/\\S{3,8}/\\d{4}:\\d{2}:\\d{2}:\\d{2} [+-]\\d{2,4})\\] (?!\\w+:)(?<body>.*)$"
            }
        },
        "level": {
            "error": "E",
            "warning": "W"
        },
        "value": {
            "level": {
                "kind": "string",
                "identifier": true
            },
            "section": {
                "kind": "string",
                "identifier": true
            },
            "body": {
                "kind": "string"
            }
        },
        "sample": [
            {
                "line": "I [04/Nov/2010:17:37:40 -0400] Allowing up to 100 client connections per host."
            },
            {
                "line": "I [04/Nov/2010:17:37:40 -0400] LoadPPDs: Wrote \"/etc/cups/ppds.dat\", 14 PPDs..."
            },
            {
                "line": "E [04/Nov/2010:17:37:40 -0400] StartListening: Unable to find IP address for server name \"localhost.localdomain\" - Host name lookup failure"
            }
        ]
    }
}