Level l = OptionConverter.toLevel((String) value, hierarchy.getThreshold()); hierarchy.setThreshold(l);
public static void withDisabledLogging(final Runnable r) { // Note: this assumes we're using Log4J and needs to be fixed up if this changes. final LoggerRepository loggerRepo = LogManager.getLoggerRepository(); final Level oldLevel = loggerRepo.getThreshold(); loggerRepo.setThreshold(Level.OFF); try { r.run(); } finally { loggerRepo.setThreshold(oldLevel); } } }
LogLog.debug("Threshold =\"" + thresholdStr +"\"."); if(!"".equals(thresholdStr) && !"null".equals(thresholdStr)) { repository.setThreshold(thresholdStr);
properties); if(thresholdStr != null) { hierarchy.setThreshold(OptionConverter.toLevel(thresholdStr, (Level) Level.ALL)); LogLog.debug("Hierarchy threshold set to ["+hierarchy.getThreshold()+"].");
Level l = OptionConverter.toLevel((String) value, hierarchy.getThreshold()); hierarchy.setThreshold(l);
LogLog.debug("Threshold =\"" + thresholdStr +"\"."); if(!"".equals(thresholdStr) && !"null".equals(thresholdStr)) { repository.setThreshold(thresholdStr);
LogLog.debug("Threshold =\"" + thresholdStr +"\"."); if(!"".equals(thresholdStr) && !"null".equals(thresholdStr)) { repository.setThreshold(thresholdStr);
/** Read configuration options from <code>properties</code>. See {@link #doConfigure(String, LoggerRepository)} for the expected format. */ public void doConfigure(Properties properties, LoggerRepository hierarchy) { String value = properties.getProperty(LogLog.DEBUG_KEY); if(value == null) { value = properties.getProperty(LogLog.CONFIG_DEBUG_KEY); if(value != null) LogLog.warn("[log4j.configDebug] is deprecated. Use [log4j.debug] instead."); } if(value != null) { LogLog.setInternalDebugging(OptionConverter.toBoolean(value, true)); } String thresholdStr = OptionConverter.findAndSubst(THRESHOLD_PREFIX, properties); if(thresholdStr != null) { hierarchy.setThreshold(OptionConverter.toLevel(thresholdStr, (Level) Level.ALL)); LogLog.debug("Hierarchy threshold set to ["+hierarchy.getThreshold()+"]."); } configureRootCategory(properties, hierarchy); configureLoggerFactory(properties); parseCatsAndRenderers(properties, hierarchy); LogLog.debug("Finished configuring."); // We don't want to hold references to appenders preventing their // garbage collection. registry.clear(); }
properties); if(thresholdStr != null) { hierarchy.setThreshold(OptionConverter.toLevel(thresholdStr, Level.ALL)); LogLog.debug("Hierarchy threshold set to ["+hierarchy.getThreshold()+"].");
/** The string form of {@link #setThreshold(Level)}. @param levelStr symbolic name for level */ public void setThreshold(final String levelStr) { repo.setThreshold(levelStr); }
/** Enable logging for logging requests with level <code>l</code> or higher. By default all levels are enabled. @param l The minimum level for which logging requests are sent to their appenders. */ public void setThreshold(final Level l) { repo.setThreshold(l); }
@Override public void setThreshold(String val) { loggerRepository.setThreshold(val); }
@Override public void setThreshold(Level level) { loggerRepository.setThreshold(level); }
/** The string form of {@link #setThreshold(Level)}. @param levelStr symbolic name for level */ public void setThreshold(final String levelStr) { repo.setThreshold(levelStr); }
/** Enable logging for logging requests with level <code>l</code> or higher. By default all levels are enabled. @param l The minimum level for which logging requests are sent to their appenders. */ public void setThreshold(final Level l) { repo.setThreshold(l); }
/** * Turns all logging off. */ public void disableAll() { LogManager.getLoggerRepository().setThreshold(Level.OFF); }
@Override protected void setUp() { LogManager.getLoggerRepository().setThreshold(Level.OFF); comparator = new MemberOrderComparator(true); laxComparator = new MemberOrderComparator(false); }
protected void setUp() throws Exception { LogManager.getLoggerRepository().setThreshold(Level.OFF); system = new TestSystem(); system.init(); nakedObject = new DummyNakedObject(); ((DummyNakedObject) nakedObject).setupObject(new TestPojo()); associationDelegate = new TestPojoValuePeer(); type = new TestSpecification(); association = new ValueAssociationImpl(NAME, type, associationDelegate); }
protected void setUp() throws Exception { LogManager.getLoggerRepository().setThreshold(Level.OFF); system = new TestSystem(); system.init(); nakedObject = new DummyNakedObject(); ((DummyNakedObject) nakedObject).setupResolveState(ResolveState.RESOLVED); associate = new DummyNakedObject(); ((DummyNakedObject) associate).setupResolveState(ResolveState.RESOLVED); associationDelegate = new DummyOneToOnePeer(); type = new TestSpecification(); association = new OneToOneAssociationImpl(NAME, type, associationDelegate); }
public void setUp() throws ObjectPersistenceException { LogManager.getLoggerRepository().setThreshold(Level.OFF); StaticContext.createInstance().setObjectPersistor(new TestPersistor()); nakedObject = new DummyNakedObject(); ((DummyNakedObject) nakedObject).setupResolveState(ResolveState.RESOLVED); associate = new DummyNakedObject(); ((DummyNakedObject) associate).setupResolveState(ResolveState.RESOLVED); type = new TestSpecification(); associationDelegate = new DummyOneToManyPeer(); association = new OneToManyAssociationImpl(FIELD_NAME, type, associationDelegate); }