public static void initLogging ( String location ) throws FileNotFoundException { String resolvedLocation = SystemPropertyUtils . resolvePlaceholders ( location ) ; URL url = ResourceUtils . getURL ( resolvedLocation ) ; if ( resolvedLocation . toLowerCase ( ) . endsWith ( XML_FILE_EXTENSION ) ) { DOMConfigurator . configure ( url ) ; } else { PropertyConfigurator . configure ( url ) ; } }
Initialize log4j from the given file location with no config file refreshing . Assumes an XML file in case of a . xml file extension and a properties file otherwise .