Logger (@NotNull Map<? super Level, List<Pair<String, Throwable>>> diags) { java.util.logging.Logger julLogger = new java.util.logging.Logger("", null) { @Override public void log(java.util.logging.Level level, String msg, Throwable thrown) { if (thrown != null) { diags.computeIfAbsent(level, __ -> new ArrayList<>()).add(Pair.create(String.valueOf(msg), thrown)); } } }; julLogger.setLevel(Level.FINE); IdeaLogger logger = new IdeaLogger(julLogger); assertTrue(IdeaLogger.isMutingFrequentExceptionsEnabled()); return logger; }