/* */ }
/* */ }
/* */
/* */ public static void selectAndConfigure(URL url, String clazz, LoggerRepository hierarchy)
/* */ {
/* 450 */ Configurator configurator = null;
/* 451 */ String filename = url.getFile();
/* */
/* 453 */ if ((clazz == null) && (filename != null) && (filename.endsWith(".xml"))) {
/* 454 */ clazz = "org.apache.log4j.xml.DOMConfigurator";
/* */ }
/* */
/* 457 */ if (clazz != null) {
/* 458 */ LogLog.debug("Preferred configurator class: " + clazz);
/* 459 */ configurator = (Configurator)instantiateByClassName(clazz, Configurator.class, null);
/* */
/* 462 */ if (configurator == null) {
/* 463 */ LogLog.error("Could not instantiate configurator [" + clazz + "].");
/* 464 */ return;
/* */ }
/* */ } else {
/* 467 */ configurator = new PropertyConfigurator();
/* */ }
/* */
/* 470 */ configurator.doConfigure(url, hierarchy);
/* */ }