File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ func parseTestLogs(rd io.Reader) []TestLog {
224
224
var testlogs []TestLog
225
225
226
226
statusRE := regexp .MustCompile (`--- (\w+):\s+(\w+)` )
227
- entryRE := regexp .MustCompile (`([0-9:.]+) \[(\w +)\] (.*)` )
227
+ entryRE := regexp .MustCompile (`([0-9:.]+) \[([\w ] +)\] (.*)` )
228
228
229
229
scanner := bufio .NewScanner (bufio .NewReader (rd ))
230
230
for scanner .Scan () {
@@ -249,10 +249,24 @@ func parseTestLogs(rd io.Reader) []TestLog {
249
249
250
250
entryMatch := entryRE .FindStringSubmatch (line )
251
251
if len (entryMatch ) > 0 {
252
+ // [kv N] entries get folded into id=N, with the "kv N" part prefixed
253
+ // to the message.
254
+ id , foundKV := strings .CutPrefix (entryMatch [2 ], "kv " )
255
+ msg := entryMatch [3 ]
256
+ if foundKV {
257
+ msg = id + " " + msg
258
+ }
259
+
260
+ // [clientNNN] entries get folded into id=TEST
261
+ if strings .HasPrefix (entryMatch [2 ], "client" ) {
262
+ id = "TEST"
263
+ msg = entryMatch [2 ] + " " + msg
264
+ }
265
+
252
266
entry := Entry {
253
267
timestamp : entryMatch [1 ],
254
- id : entryMatch [ 2 ] ,
255
- msg : entryMatch [ 3 ] ,
268
+ id : id ,
269
+ msg : msg ,
256
270
}
257
271
curlog .entries = append (curlog .entries , entry )
258
272
curlog .ids [entry .id ] = true
You can’t perform that action at this time.
0 commit comments