public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
if(!("".equals(resetAttrib))) { if (OptionConverter.toBoolean(resetAttrib, false)) { repository.resetConfiguration();
hierarchy.resetConfiguration();
public static void resetConfiguration() { repositorySelector.getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
if(!("".equals(resetAttrib))) { if (OptionConverter.toBoolean(resetAttrib, false)) { repository.resetConfiguration();
hierarchy.resetConfiguration();
@Override public void resetConfiguration() { loggerRepository.resetConfiguration(); } }
/** Reset all values contained in this hierarchy instance to their default. This removes all appenders from all categories, sets the level of all non-root categories to <code>null</code>, sets their additivity flag to <code>true</code> and sets the level of the root logger to DEBUG. Moreover, message disabling is set its default "off" value. <p>Existing categories are not removed. They are just reset. <p>This method should be used sparingly and with care as it will block all logging until it is completed.</p> @since 0.8.5 */ public void resetConfiguration() { repo.resetConfiguration(); }
/** Reset all values contained in this hierarchy instance to their default. This removes all appenders from all categories, sets the level of all non-root categories to <code>null</code>, sets their additivity flag to <code>true</code> and sets the level of the root logger to DEBUG. Moreover, message disabling is set its default "off" value. <p>Existing categories are not removed. They are just reset. <p>This method should be used sparingly and with care as it will block all logging until it is completed.</p> @since 0.8.5 */ public void resetConfiguration() { repo.resetConfiguration(); }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void resetConfiguration() { getLoggerRepository().resetConfiguration(); } }
public static void main(String[] args) throws PatentReaderException, IOException, DocumentException, XPathExpressionException { /* * Disable Logging except for Errors. */ Logger.getRootLogger().getLoggerRepository().resetConfiguration(); ConsoleAppender console = new ConsoleAppender(); String PATTERN = "%d [%p|%c|%C{1}] %m%n"; console.setLayout(new PatternLayout(PATTERN)); console.setThreshold(Level.ERROR); console.activateOptions(); Logger.getRootLogger().addAppender(console); GrepConfig grepConfig = new GrepConfig(); grepConfig.buildArgs(); grepConfig.parseArgs(args); grepConfig.readOptions(); Grep grep = new Grep(grepConfig); grep.find(); }
@Test public void testOutsideConfiguration() throws IOException { LogManager.getLoggerRepository().resetConfiguration(); ta.setName(TANAME); JrdsLoggerConfiguration.jrdsAppender = ta; Logger.getRootLogger().addAppender(ta); JrdsLoggerConfiguration.initLog4J(); Assert.assertNotNull(LogManager.getLoggerRepository().exists("jrds")); PropertiesManager pm = Tools.makePm(testFolder, "loglevel=error"); JrdsLoggerConfiguration.configure(pm); Logger l = Logger.getLogger("jrds"); l.error("A message"); l.debug("A debug message"); Assert.assertEquals(2, logs.size()); }
@Test public void testConfiguration() throws IOException { LogManager.getLoggerRepository().resetConfiguration(); JrdsLoggerConfiguration.initLog4J(); Logger jrdsLogger = LogManager.getLoggerRepository().exists("jrds"); Assert.assertNotNull(jrdsLogger); PropertiesManager pm = Tools.makePm(testFolder, "loglevel=warn"); JrdsLoggerConfiguration.configure(pm); Assert.assertEquals(pm.loglevel, jrdsLogger.getLevel()); }