22// Licensed under the MIT License.
33package com .microsoft .gctoolkit .parser ;
44
5+ import com .microsoft .gctoolkit .GCToolKit ;
56import com .microsoft .gctoolkit .event .GCCause ;
67import com .microsoft .gctoolkit .event .GCCauses ;
78import com .microsoft .gctoolkit .event .MemoryPoolSummary ;
@@ -28,7 +29,6 @@ public class GCLogTrace extends AbstractLogTrace {
2829 private static final Logger LOGGER = Logger .getLogger (GCLogTrace .class .getName ());
2930
3031 private final boolean gcCauseDebugging = Boolean .getBoolean ("microsoft.debug.gccause" );
31- // private final boolean debugging = Boolean.getBoolean("microsoft.debug");
3232
3333 public GCLogTrace (Matcher matcher ) {
3434 super (matcher );
@@ -292,15 +292,16 @@ public void notYetImplemented() {
292292 LOGGER .log (Level .FINE , "{0} : {1}" , new Object []{i , getGroup (i )});
293293 }
294294 LOGGER .fine ("-----------------------------------------" );
295- //IntelliJ Eats this log output so it's displayed to stdout..
296- //And yes, that means System.out.println is in here in on purpose
297- //if ( debugging) {
298- System .out .println (threadName + ", not implemented: " + getGroup (0 ));
299- for (int i = 1 ; i < groupCount () + 1 ; i ++) {
300- System .out .println (i + ": " + getGroup (i ));
301- }
302- System .out .println ("-----------------------------------------" );
303- //}
295+ //IntelliJ Eats this log output, so it's displayed to stdout
296+ GCToolKit .LOG_DEBUG_MESSAGE (() -> {
297+ StringBuilder debugMessage = new StringBuilder ();
298+ debugMessage .append (threadName ).append (", not implemented: " ).append (getGroup (0 )).append (System .lineSeparator ());
299+ for (int i = 1 ; i < groupCount () + 1 ; i ++) {
300+ debugMessage .append (i ).append (": " ).append (getGroup (i )).append (System .lineSeparator ());
301+ }
302+ debugMessage .append ("-----------------------------------------" );
303+ return debugMessage .toString ();
304+ });
304305 }
305306
306307 public ZGCPhase getZCollectionPhase () {
0 commit comments