private void assertThatLogEventsContains(String message, String loggerName, Level level) {
    List<LogEvent> logEvents = geodeConsoleAppender.getLogEvents();
    for (LogEvent logEvent : logEvents) {
      if (logEvent.getMessage().getFormattedMessage().contains(message)) {
        assertThat(logEvent.getMessage().getFormattedMessage()).isEqualTo(message);
        assertThat(logEvent.getLoggerName()).isEqualTo(loggerName);
        assertThat(logEvent.getLevel()).isEqualTo(level);
        return;
      }
    }
    fail("Expected message " + message + " not found in " + logEvents);
  }
Integration tests for {@link DistributedSystem} and log level changes with
{@link GeodeConsoleAppender}.
geode-log4j/src/integrationTest/java/org/apache/geode/logging/log4j/internal/impl/DistributedSystemWithLogLevelChangesIntegrationTest.java