@@ -138,7 +138,7 @@ public interface ProcessStarter {
138138 Pattern .CASE_INSENSITIVE
139139 );
140140 private static final Pattern RUNTIME_LOG_LINE = Pattern .compile (
141- "^\\ d{2}:\\ d{2}:\\ d{2}\\ . \\ d{3}\\ s+(TRACE|DEBUG|INFO|WARN|ERROR)\\ s+ \\ [[^ \\ ]]+ \\ ] \\ s+.+? \\ s+- \\ s+.+$ " ,
141+ "^\\ d{2}:\\ d{2}:\\ d{2}[.,] \\ d{3}\\ s+\\ |?-? (TRACE|DEBUG|INFO|WARN|ERROR)\\ b " ,
142142 Pattern .CASE_INSENSITIVE
143143 );
144144
@@ -403,13 +403,19 @@ private void scrollToBottom() {
403403 }
404404
405405 private static String classifyLine (String line ) {
406- if (line .startsWith ("\u200B " )) return "run-console-line-milestone" ;
406+ if (line .startsWith ("\u200B " )) return "run-console-line-milestone" ;
407+ java .util .regex .Matcher rtm = RUNTIME_LOG_LINE .matcher (line );
408+ if (rtm .find ()) {
409+ String level = rtm .group (1 ).toUpperCase ();
410+ return switch (level ) {
411+ case "ERROR" -> "run-console-line-error" ;
412+ case "WARN" -> "run-console-line-warn" ;
413+ case "INFO" -> "run-console-line-info" ;
414+ default -> "run-console-line-engine" ;
415+ };
416+ }
407417 if (ERROR_LINE .matcher (line ).find ()) return "run-console-line-error" ;
408418 if (WARN_LINE .matcher (line ).find ()) return "run-console-line-warn" ;
409- if (RUNTIME_LOG_LINE .matcher (line ).find ()) {
410- if (line .toUpperCase ().contains (" INFO " )) return "run-console-line-info" ;
411- return "run-console-line-engine" ;
412- }
413419 if (ENGINE_MSG .matcher (line ).find ()) return "run-console-line-engine" ;
414420 if (GRADLE_NOISE .matcher (line ).find ()) return "run-console-line-noise" ;
415421 return "run-console-line-normal" ;
0 commit comments