/** * Tests that getting the log level is what we expect. */ public void test007GetLogLevel() { Level logLevel = Level.FINER; Properties props = new Properties(); // int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS); // props.setProperty("mcast-port", String.valueOf(unusedPort)); // a loner is all this test needs props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); props.put(DistributionConfig.LOG_LEVEL_NAME, logLevel.toString()); DistributionConfig config = createSystem(props).getConfig(); assertEquals(logLevel.intValue(), config.getLogLevel()); }
public void test028NonDefaultLogLevel() { Level level = Level.FINE; Properties props = new Properties(); // int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS); // props.setProperty("mcast-port", String.valueOf(unusedPort)); // a loner is all this test needs props.setProperty("mcast-port", "0"); props.setProperty("locators", ""); props.put(DistributionConfig.LOG_LEVEL_NAME, level.toString()); InternalDistributedSystem system = createSystem(props); assertEquals(level.intValue(), system.getConfig().getLogLevel()); assertEquals(level.intValue(), ((LogWriterImpl) system.getLogWriter()).getLevel()); }
public void run() { GemFireCacheImpl cacheVM1 = (GemFireCacheImpl) getCache(); final DistributionConfig configVM1 = cacheVM1.getSystem().getConfig(); assertEquals(LogWriterImpl.INFO_LEVEL, configVM1.getLogLevel()); assertEquals(LOG__FILE__SIZE__LIMIT, configVM1.getLogFileSizeLimit()); assertEquals(ARCHIVE__FILE__SIZE__LIMIT, configVM1.getArchiveFileSizeLimit()); assertEquals(ARCHIVE__DISK__SPACE__LIMIT, configVM1.getArchiveDiskSpaceLimit()); assertEquals(STATISTIC__SAMPLE__RATE, configVM1.getStatisticSampleRate()); assertEquals(STATISTIC__ARCHIVE__FILE, configVM1.getStatisticArchiveFile().getName()); assertEquals(STATISTIC__SAMPLING__ENABLED, configVM1.getStatisticSamplingEnabled()); assertEquals(LOG__DISK__SPACE__LIMIT, configVM1.getLogDiskSpaceLimit()); } });
getLogWriter().info(resultString); assertEquals(true, cmdResult.getStatus().equals(Status.OK)); assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel()); assertEquals(LOG__FILE__SIZE__LIMIT, config.getLogFileSizeLimit()); assertEquals(ARCHIVE__DISK__SPACE__LIMIT, config.getArchiveDiskSpaceLimit());
assertEquals(LogWriterImpl.INFO_LEVEL, config.getLogLevel()); assertEquals(LOG__FILE__SIZE__LIMIT, config.getLogFileSizeLimit()); assertEquals(ARCHIVE__DISK__SPACE__LIMIT, config.getArchiveDiskSpaceLimit());
} else { logger = new GFToSlf4jBridge(config.getName(), logFilePath, config.getLogLevel()); logger = new SecurityLocalLogWriter(config.getSecurityLogLevel(), out); } else { logger = new LocalLogWriter(config.getLogLevel(), out); mlw = new ManagerLogWriter(config.getLogLevel(), out, config.getName());
LogWriterImpl.levelToString(distConfig.getLogLevel()); this.logDiskSpaceLimit = distConfig.getLogDiskSpaceLimit(); this.logFileSizeLimit = distConfig.getLogFileSizeLimit();
LogWriterImpl.levelToString(distConfig.getLogLevel()); this.logDiskSpaceLimit = distConfig.getLogDiskSpaceLimit(); this.logFileSizeLimit = distConfig.getLogFileSizeLimit();
this.deployWorkingDir = other.getDeployWorkingDir(); this.logFile = other.getLogFile(); this.logLevel = other.getLogLevel(); this.statisticSamplingEnabled = other.getStatisticSamplingEnabled(); this.statisticSampleRate = other.getStatisticSampleRate();
gemFirePropertyData.setStartLocator(config.getStartLocator()); gemFirePropertyData.setLogFile(config.getLogFile().getAbsolutePath()); gemFirePropertyData.setLogLevel(config.getLogLevel()); gemFirePropertyData.setStatisticSamplingEnabled(config .getStatisticSamplingEnabled());
assertEquals(data.getStartLocator(), config.getStartLocator()); assertEquals(data.getLogFile(), config.getLogFile().getAbsolutePath()); assertEquals(data.getLogLevel(), config.getLogLevel()); assertEquals(data.isStatisticSamplingEnabled(), config .getStatisticSamplingEnabled());
this.deployWorkingDir = other.getDeployWorkingDir(); this.logFile = other.getLogFile(); this.logLevel = other.getLogLevel(); this.statisticSamplingEnabled = other.getStatisticSamplingEnabled(); this.statisticSampleRate = other.getStatisticSampleRate();
gemFirePropertyData.setStartLocator(config.getStartLocator()); gemFirePropertyData.setLogFile(config.getLogFile().getAbsolutePath()); gemFirePropertyData.setLogLevel(config.getLogLevel()); gemFirePropertyData.setStatisticSamplingEnabled(config .getStatisticSamplingEnabled());