/** * This constructor creates a completely independent * Log4J hierarchy. If you want to log to an existing * Log4J hierarchy please use Log4JAdapter. This class * always creates a new private hierarchy and configures * it all by itself. */ public Log4JConfAdapter() { /** * Copied from org.apache.log4j.LogManager. */ super( new Hierarchy( new RootCategory( Level.ALL ) ) ); }
isolatedHierarchy = new Hierarchy(new RootCategory(Level.INFO)); new PropertyConfigurator().doConfigure(p,isolatedHierarchy); IsolatedLog4JLogger.setHierarchy(isolatedHierarchy);