From 839b7bd164583adbc9f7e4a158d6acaa3c844288 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 20 Sep 2026 20:47:19 +0200 Subject: [PATCH] Cut the importer's rationale, pin the name selection the docs show, and spell the PRI alike --- README.md | 4 ++-- data-import/loglevel.py | 4 +--- table_test.go | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8305d43..a4b4170 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ for an ASCII one, which selects the row too, so `misc.tld[.рф]` renders `.xn-- draw spans the whole zone, `.arpa` and `.zuerich` alike, so pin `misc.tld[.com]` where a fixture needs one a reader recognises. `misc.loglevel` is RFC 5424's eight severities, keyed by the numerical code a syslog -PRI carries and named by the severity, so `misc.loglevel[3]` and `misc.loglevel[Error]` +PRI encodes and named by the severity, so `misc.loglevel[3]` and `misc.loglevel[Error]` are one row and `misc.loglevel.code` the number beside the name. [`DATA-LICENSES.md`](DATA-LICENSES.md) names each table's source and licence. @@ -1234,7 +1234,7 @@ the Development section below, and who ships a register the four above then draw stands alone, which is `EH` alone, and naming one for it would be a claim fejkdata has no business making. - **`misc.loglevel` is a table keyed by the code, not a list of names.** A syslog - message carries the severity as the number inside its PRI, so the code and the name + message carries the severity as the number its PRI encodes, so the code and the name are one fact and goal 1 draws them together. The `emerg`, `err` and `info` an rsyslog config takes are BSD's spellings, which RFC 5424 writes nowhere, so shipping them would be the hand-written mapping goal 10 keeps out of a sourced table. diff --git a/data-import/loglevel.py b/data-import/loglevel.py index 439e067..ed8cafb 100644 --- a/data-import/loglevel.py +++ b/data-import/loglevel.py @@ -3,9 +3,7 @@ data-import/loglevel.py [--source URL_OR_FILE] [--cache DIR] [--out FILE] -Table 2 is the whole set, read between the facility table's caption and its own. The -RFC describes both tables for informational purposes, so a severity is what an -originator writes rather than something a collector rejects. +Table 2 is the whole set, read between the facility table's caption and its own. """ import argparse import re diff --git a/table_test.go b/table_test.go index a85cd7e..62ffb68 100644 --- a/table_test.go +++ b/table_test.go @@ -733,7 +733,7 @@ func TestShippedTables(t *testing.T) { "loglevel[5]": "Notice", "loglevel[6]": "Informational", "loglevel[7]": "Debug", - "loglevel[Informational].code": "6", + "loglevel[Error].code": "3", } { if got := fake(t, f, path); got != want { t.Errorf("Fake(%q) = %q, want %q", path, got, want)