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

    cache = (InternalCache) new CacheFactory(config).create();
    InternalDistributedSystem system = cache.getInternalDistributedSystem();

    distributionConfig = system.getConfig();
    logConfig = system.getLogConfig();

    mainLogWriter = (InternalLogWriter) cache.getLogger();
    securityLogWriter = (InternalLogWriter) cache.getSecurityLogger();

    geodeLogger = LogService.getLogger();
    applicationLogger = LogManager.getLogger(APPLICATION_LOGGER_NAME);
  }
Integration tests for log level control using {@link DistributionConfig} with lifecycle of
{@link Cache}.
geode-core/src/integrationTest/java/org/apache/geode/logging/internal/api/LogLevelChangesWithCacheIntegrationTest.java