summaryrefslogtreecommitdiffstats
path: root/src/formats/page_log.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/formats/page_log.json')
-rw-r--r--src/formats/page_log.json67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/formats/page_log.json b/src/formats/page_log.json
new file mode 100644
index 0000000..0758b13
--- /dev/null
+++ b/src/formats/page_log.json
@@ -0,0 +1,67 @@
+{
+ "$schema": "https://lnav.org/schemas/format-v1.schema.json",
+ "page_log": {
+ "title": "CUPS Page Log",
+ "description": "The CUPS server log of printed pages.",
+ "url": "http://www.cups.org/documentation.php/doc-1.7/ref-page_log.html",
+ "multiline": false,
+ "regex": {
+ "pre-1.7": {
+ "pattern": "^(?<printer>[\\w_\\-\\.]+) (?<username>[\\w\\.\\-]+) (?<job_id>\\d+) \\[(?<timestamp>[^\\]]+)\\] (?<page_number>total|\\d+) (?<num_copies>\\d+) (?<job_billing>[^ ]+) (?<job_originating_hostname>[\\w\\.:\\-]+)$"
+ },
+ "1.7": {
+ "pattern": "^(?<printer>[\\w_\\-\\.]+) (?<username>[\\w\\.\\-]+) (?<job_id>\\d+) \\[(?<timestamp>[^\\]]+)\\] (?<page_number>total|\\d+) (?<num_copies>\\d+) (?<job_billing>[^ ]+) (?<job_originating_hostname>[\\w\\.:\\-]+) (?<job_name>.+) (?<media>[^ ]+) (?<sides>.+)(?<body>.*)$"
+ }
+ },
+ "value": {
+ "printer": {
+ "kind": "string",
+ "identifier": true
+ },
+ "username": {
+ "kind": "string",
+ "identifier": true
+ },
+ "job_id": {
+ "kind": "integer",
+ "identifier": true,
+ "foreign-key": true
+ },
+ "page_number": {
+ "kind": "string"
+ },
+ "num_copies": {
+ "kind": "integer"
+ },
+ "job_billing": {
+ "kind": "string",
+ "identifier": true
+ },
+ "job_originating_hostname": {
+ "kind": "string",
+ "collate": "ipaddress",
+ "identifier": true
+ },
+ "job_name": {
+ "kind": "string",
+ "identifier": true
+ },
+ "media": {
+ "kind": "string",
+ "identifier": true
+ },
+ "sides": {
+ "kind": "string",
+ "identifier": true
+ }
+ },
+ "sample": [
+ {
+ "line": "Photosmart_7520_series stack 11 [18/May/2013:13:21:15 -0700] total 0 - localhost 5615311548-159003235-tickets.pdf Letter one-sided"
+ },
+ {
+ "line": "tec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 1 3 #marketing 10.160.50.13"
+ }
+ ]
+ }
+} \ No newline at end of file