Replace log query implementation

The interface provided by Winston is unusably slow for querying large
logs.  Reimplement the log querying with both forwards and backwards
line reading and a simple file based index to skip files which do not
contain any lines matching the filter.
This commit is contained in:
Hornwitser committed 2021-12-19 02:06:59 +01:00
1 parent fd1f3329bd
commit 601ebba919
10 files changed
+497 -54

No files matched your search

+1
View File
@@ -0,0 +1 @@
This file should be excluded by queries and the index
+9
View File
@@ -0,0 +1,9 @@
{"timestamp":"2021-12-10T10:00:00.000Z","level":"verbose","message":"Master start"}
{"timestamp":"2021-12-10T10:00:01.000Z","level":"verbose","message":"Loading"}
{"timestamp":"2021-12-10T10:00:03.000Z","level":"info","message":"Ready"}
{"timestamp":"2021-12-10T10:00:10.000Z","slave_id":1,"level":"verbose","message":"Slave connected"}
{"timestamp":"2021-12-10T10:00:11.000Z","slave_id":1,"level":"verbose","message":"Found instance 10"}
{"timestamp":"2021-12-10T10:00:13.000Z","slave_id":1,"instance_id":10,"level":"server","message":"Starting up"}
{"timestamp":"2021-12-10T10:00:14.000Z","slave_id":1,"instance_id":10,"level":"server","message":"Loading map"}
{"timestamp":"2021-12-10T10:00:15.000Z","slave_id":1,"instance_id":10,"level":"server","message":"Game ready"}
{"timestamp":"2021-12-10T10:01:00.000Z","slave_id":1,"instance_id":10,"level":"error","message":"Unexpected crash"}
+3
View File
@@ -0,0 +1,3 @@
{"timestamp":"2021-12-11T10:00:00.000Z","level":"verbose","message":"Master start"}
{"timestamp":"2021-12-11T10:00:01.000Z","level":"verbose","message":"Loading"}
{"timestamp":"2021-12-11T10:00:03.000Z","level":"fatal","message":"An error occured"}
+1
View File
@@ -0,0 +1 @@
{"timestamp":"2021-12-12T10:00:00.000Z","leve
View File
Whitespace-only changes.