@Before
  public void setUp() {
    Properties config = new Properties();
    config.setProperty(LOCATORS, "");
    config.setProperty(MCAST_PORT, "0");
    config.setProperty(LOG_LEVEL, INFO.name());

    cache = new CacheFactory(config).create();

    geodeLogger = (Logger) cache.getLogger();
    logger = LogService.getLogger();
    infoMessage = "INFO in " + testName.getMethodName();
    warnMessage = "WARN in " + testName.getMethodName();
    listAppender = loggerContextRule.getListAppender("CUSTOM");

    systemOutRule.clearLog();
    systemErrRule.clearLog();
  }
Integration tests for {@link Cache} with custom {@code log4j2.xml}.
geode-log4j/src/integrationTest/java/org/apache/geode/logging/log4j/internal/impl/CacheWithCustomLogConfigIntegrationTest.java