@Test
  public void logEventShouldMatchCustomConfig() {
    logger.info(logMessage);

    LogEvent logEvent = listAppender.getEvents().get(0);
    assertThat(logEvent.getLoggerName()).isEqualTo(logger.getName());
    assertThat(logEvent.getLevel()).isEqualTo(Level.INFO);
    assertThat(logEvent.getMessage().getFormattedMessage()).isEqualTo(logMessage);

    assertThat(systemOutRule.getLog()).contains(Level.INFO.name());
    assertThat(systemOutRule.getLog()).contains(logMessage);
    assertThat(systemOutRule.getLog()).contains(CONFIG_LAYOUT_PREFIX);
    assertThat(CUSTOM_REGEX.matcher(systemOutRule.getLog()).matches()).isTrue();
  }
Integration tests for {@link LogService} with custom logging configuration.
geode-log4j/src/integrationTest/java/org/apache/geode/logging/log4j/internal/impl/LogServiceWithCustomLogConfigIntegrationTest.java