Skip to content

Commit c34d795

Browse files
committed
Add support for latest chia log file format
1 parent baacdc5 commit c34d795

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@foxypool/chia-log-analyzer",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"author": "Felix Brucker <[email protected]>",
55
"license": "GPL-3.0-or-later",
66
"type": "module",

src/log-line-mapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function mapLogFileContentsToLogLines(logFileContents: string): LogLine[]
2525
}
2626

2727

28-
const logLineRegex = /^([0-9-]+T[0-9:.]+) ([a-z._]+) ([a-z._]+)\s*: ([A-Z]+) \s*((?:.|\s)*)$/
28+
const logLineRegex = /^([0-9-]+T[0-9:.]+)(?: [0-9.]+)? ([a-z._]+) ([a-z._]+)\s*: ([A-Z]+) \s*((?:.|\s)*)$/
2929
function mapToLogLine(line: string): LogLine|undefined {
3030
const matches = line.trim().match(logLineRegex)
3131
if (matches === null || matches.length !== 6) {

0 commit comments

Comments
 (0)