Skip to content

Commit f3c7140

Browse files
committed
convert comments to C-style comments
1 parent 2c69fcf commit f3c7140

4 files changed

Lines changed: 18 additions & 26 deletions

File tree

src/formats/gitea_log.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
},
4848
{
4949
"line": "^[[36m2023/09/24 22:16:01 ^[[0m^[[32mcmd/web.go:175:^[[32mserveInstalled()^[[0m ^[[1;32m[I]^[[0m PING DATABASE mysql",
50-
"level": "info",
51-
"comment": "log line stored with terminal color codes"
50+
"level": "info"
51+
// log line stored with terminal color codes
5252
}
5353
]
5454
}

src/formats/i2p_router_log.json

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@
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)) .*))$",
11-
"comments": [
12-
"The I2P router uses several log line variants that largely differ in their formats.",
13-
"editing a variant should be done below in subformats for better readability and understandability,",
14-
"and then merged into the pattern above."
15-
],
16-
"subformats": {
17-
"variant_normal": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?<level>[A-Z]+) \\[(?<module>[\\w \\\/]+)\\] (?<component>[\\w.]+): (?<body>.*)$",
18-
"variant_omit": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?:\\^){3} \\d+ similar messages omitted (?:\\^){3}$",
19-
"variant_exception": "^(?:(?:(?:[\\w.]+(?<level>Exception):)|(?:\\\\0009at)) .*)$"
20-
}
21-
},
22-
"teszt": {
23-
"pattern": "(Exception)|(\\s+handler 1/1)|(\\sat [\\w.]+)|(similar messages omitted)",
24-
"module-format": true
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)) .*))$"
11+
// The I2P router uses several log line variants that largely differ in their formats.
12+
// Editing a variant should be done below in subformats for better readability and understandability,
13+
// and then merged into the pattern above.
14+
// subformats:
15+
// "variant_normal": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?<level>[A-Z]+) \\[(?<module>[\\w \\\/]+)\\] (?<component>[\\w.]+): (?<body>.*)$"
16+
// "variant_omit": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+) (?:\\^){3} \\d+ similar messages omitted (?:\\^){3}$"
17+
// "variant_exception": "^(?:(?:(?:[\\w.]+(?<level>Exception):)|(?:\\\\0009at)) .*)$"
2518
}
2619
},
2720
"value": {
@@ -47,12 +40,12 @@
4740
"level": "warning"
4841
},
4942
{
50-
"line": "2023-10-25 03:33:42.121 ^^^ 2 similar messages omitted ^^^",
51-
"comment": "when lines are repated, the replacmeent line does not have a log level"
43+
"line": "2023-10-25 03:33:42.121 ^^^ 2 similar messages omitted ^^^"
44+
// when lines are repated, the replacmeent line does not have a log level
5245
},
5346
{
54-
"line": "java.io.IOException: Peer is dead: F~UzS1mTN3XYlnOfidMBv5Z4lHI7dsCZ8N5mxpyc-OU=\\n",
55-
"comment": "handle exception lines"
47+
"line": "java.io.IOException: Peer is dead: F~UzS1mTN3XYlnOfidMBv5Z4lHI7dsCZ8N5mxpyc-OU=\\n"
48+
// handle exception lines
5649
},
5750
{
5851
"line": "\\u0009at net.i2p.router.transport.udp.PeerState2.getNextPacketNumber(PeerState2.java:326)\\n"

src/formats/logcat.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"description" : "The system logger format of the Android operating system.",
66
"url" : "https://developer.android.com/studio/command-line/logcat.html",
77
"regex" : {
8-
"logcat_format_threadtime" : {
9-
"pattern" : "^(?<timestamp>\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}.\\d{3})\\s+(?<log_pid>\\d+)\\s+(?<log_tid>\\d+)\\s+(?<level>\\w)\\s+(?:\\[@@\\s+\\]\\s)?(?<log_tag>.*)(?:\\s+)?:\\s+(?<body>.*)$",
10-
"comment:": "threadtime is a format accepted by the `logcat -v <format>` command"
8+
"logcat_format_threadtime" : { // threadtime is a format accepted by the `logcat -v <format>` command
9+
"pattern" : "^(?<timestamp>\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}.\\d{3})\\s+(?<log_pid>\\d+)\\s+(?<log_tid>\\d+)\\s+(?<level>\\w)\\s+(?:\\[@@\\s+\\]\\s)?(?<log_tag>.*)(?:\\s+)?:\\s+(?<body>.*)$"
1110
}
1211
},
1312
"timestamp-format" : ["%m-%d %H:%M:%S.%L"],

src/formats/virtiofsd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
},
3939
{
4040
"line": "[2024-07-20T14:21:58Z DEBUG virtiofsd::server] Received request: opcode=Lookup (1), inode=1111, unique=2222, pid=3333",
41-
"level": "debug",
42-
"comment": ") at the end of opcode gets dropped by field recognition, but highlights highlight it as expected"
41+
"level": "debug"
42+
// ')' at the end of opcode gets dropped by field recognition, but highlights highlight it as expected
4343
}
4444
]
4545
}

0 commit comments

Comments
 (0)