add rule definition with minimal dsl
This commit is contained in:
parent
fa524a5976
commit
084c5a2574
5 changed files with 48 additions and 15 deletions
|
@ -1,10 +1,11 @@
|
|||
#!/bin/env -S deno run
|
||||
|
||||
import { extr } from "./mod.ts"
|
||||
import { def } from "./mod.ts"
|
||||
|
||||
const date = ["month", " ", "day", " ", "h", ":", "m", ":", "s"] as const;
|
||||
const service = extr("", ...date, " ", "device", " ", "service", "[", "pid", "]: ", "line");
|
||||
const kernel_ = extr("", ...date, " ", "device", " kernel: ", "line");
|
||||
|
||||
const date = "{{month}} {{day}} {{h}}:{{m}}:{{s}}" as const;
|
||||
const service = def(`${date} {{device}} {{service}}[{{pid}}]: {{line}}`);
|
||||
const kernel_ = def(`${date} {{device}} kernel: {{line}}`);
|
||||
|
||||
const lines = [
|
||||
"août 06 09:25:18 navis systemd[1]: Finished Load Kernel Module configfs.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue