Skip to content

Commit 983bb67

Browse files
committed
add alternative pattern for I2P log pattern
for matching the startup lines, for formati recognition
1 parent f3c7140 commit 983bb67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/formats/i2p_router_log.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
"multiline": true,
88
"regex": {
99
"std": {
10-
"pattern": "^(?J:(?:(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?:(?<level>[A-Z]+) \\[(?<module>[\\w \\/]+)\\] (?<component>[\\w.]+): (?<body>.*)|(?:(?:\\^){3} \\d+ similar messages omitted (?:\\^){3})))|(?:(?:(?:[\\w.]+(?<level>Exception):)|(?:\\\\u0009at)) .*))$"
10+
"pattern": "^(?J:(?:(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?:(?<level>[A-Z]+) \\[(?<module>[\\w \\/]+)\\] (?<component>[\\w.]+): (?<body>.*)|(?:(?:\\^){3} \\d+ similar messages omitted (?:\\^){3})))|(?:(?:(?:[\\w.]+(?<level>Exception):)|(?:\\\tat)) .*)|(?:(?:\\*{3} .*)|(?:Starting I2P.*)|(?:\\[startapp].*)))$"
1111
// The I2P router uses several log line variants that largely differ in their formats.
1212
// Editing a variant should be done below in subformats for better readability and understandability,
1313
// and then merged into the pattern above.
1414
// subformats:
1515
// "variant_normal": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?<level>[A-Z]+) \\[(?<module>[\\w \\\/]+)\\] (?<component>[\\w.]+): (?<body>.*)$"
1616
// "variant_omit": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?:\\^){3} \\d+ similar messages omitted (?:\\^){3}$"
1717
// "variant_exception": "^(?:(?:(?:[\\w.]+(?<level>Exception):)|(?:\\\\0009at)) .*)$"
18+
// "variant_startup_lines": "^(?:(?:\*{3} .*)|(?:Starting I2P.*)|(?:\[startapp].*))$"
1819
}
1920
},
2021
"value": {

0 commit comments

Comments
 (0)