loggingLocation = LoggingUtils.getLogFileLocation(loggingLocation); LoggingUtils.initLogging( resourceLoader, loggingLevel,
configureGeoServerLogging( resourceLoader, loggingConfigStream, suppressStdOutLogging, false, logFileName);
@Test public void testInitLoggingLock() throws Exception { final File target = new File("./target"); FileUtils.deleteQuietly(new File(target, "logs")); GeoServerResourceLoader loader = new GeoServerResourceLoader(target); FileSystemResourceStore store = (FileSystemResourceStore) loader.getResourceStore(); store.setLockProvider(new MemoryLockProvider()); // make it copy the log files LoggingUtils.initLogging(loader, "DEFAULT_LOGGING.properties", false, null); // init once from default logging LoggingUtils.initLogging(loader, "DEFAULT_LOGGING.properties", false, null); // init twice, here it used to lock up LoggingUtils.initLogging(loader, "DEFAULT_LOGGING.properties", false, null); } }
/** * Finds the log location in the "context" (system variable, env variable, servlet context) or * uses the provided base location otherwise */ public static String getLogFileLocation(String baseLocation) { return getLogFileLocation(baseLocation, null); }
GeoServerResourceLoader loader = new GeoServerResourceLoader(testData.getDataDirectoryRoot()); LoggingUtils.configureGeoServerLogging( loader, getClass().getResourceAsStream(getLogConfiguration()), false, true, null);
GeoServerResourceLoader loader = new GeoServerResourceLoader(testData.getDataDirectoryRoot()); LoggingUtils.configureGeoServerLogging( loader, getClass().getResourceAsStream(getLogConfiguration()), false, true, null);
if (loginfo != null) { final String location = LoggingUtils.getLogFileLocation( loginfo.getLocation(), event.getServletContext()); LoggingUtils.initLogging( loader, loginfo.getLevel(), !loginfo.isStdOutLogging(), location); } else { loggingImporter.imprt(baseDir); final String location = LoggingUtils.getLogFileLocation(loggingImporter.getLogFile(), null); LoggingUtils.initLogging( loader, loggingImporter.getConfigFileName(),
LoggingUtils.configureGeoServerLogging( loader, this.getClass().getResourceAsStream("/TEST_LOGGING.properties"),