if(Boolean.valueOf(relinquishLoggingControl)) {
getLogger().info("RELINQUISH_LOG4J_CONTROL on, won't attempt to reconfigure LOG4J loggers");
} else {
try {
File baseDir = new File(GeoServerResourceLoader.lookupGeoServerDataDirectory(context));
GeoServerResourceLoader loader = new GeoServerResourceLoader(baseDir);
File f= loader.find( "logging.xml" );
LoggingInfo loginfo = getLogging(loader);
if ( loginfo != null ) {
final String location = LoggingUtils.getLogFileLocation(loginfo.getLocation(), event.getServletContext());
LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
location);
}
else {
//check for old style data directory
f = loader.find( "services.xml" );
if ( f != null ) {
LegacyLoggingImporter loggingImporter = new LegacyLoggingImporter();
loggingImporter.imprt(baseDir);
final String location = LoggingUtils.getLogFileLocation(loggingImporter.getLogFile(), null);
LoggingUtils.initLogging(loader, loggingImporter.getConfigFileName(), loggingImporter