boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive); logger.setAdditive(additive);
public void begin(InterpretationContext ic, String name, Attributes attributes) { threshold = System.currentTimeMillis(); // See LOGBACK-527 (the system property is looked up first. Thus, it overrides // the equivalent property in the config file. This reversal of scope priority is justified // by the use case: the admin trying to chase rogue config file String debugAttrib = getSystemProperty(DEBUG_SYSTEM_PROPERTY_KEY); if (debugAttrib == null) { debugAttrib = ic.subst(attributes.getValue(INTERNAL_DEBUG_ATTR)); } if (OptionHelper.isEmpty(debugAttrib) || debugAttrib.equalsIgnoreCase("false") || debugAttrib.equalsIgnoreCase("null")) { addInfo(INTERNAL_DEBUG_ATTR + " attribute not set"); } else { StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); } processScanAttrib(ic, attributes); LoggerContext lc = (LoggerContext) context; boolean packagingData = OptionHelper.toBoolean(ic.subst(attributes.getValue(PACKAGING_DATA_ATTR)), LoggerContext.DEFAULT_PACKAGING_DATA); lc.setPackagingDataEnabled(packagingData); if (EnvUtil.isGroovyAvailable()) { ContextUtil contextUtil = new ContextUtil(context); contextUtil.addGroovyPackages(lc.getFrameworkPackages()); } // the context is turbo filter attachable, so it is pushed on top of the // stack ic.pushObject(getContext()); }
boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive);
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } try { URL url = getInputURL(ec, attributes); if (url != null) { processInclude(ec, url); } } catch (JoranException e) { optionalWarning("Error while parsing " + attributeInUse, e); } }
boolean additive = OptionHelper.toBoolean(attributes .getValue(ActionConst.ADDITIVITY_ATTRIBUTE), true); addInfo("Setting additivity of logger [" + loggerName + "] to "
boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive);
boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive); logger.setAdditive(additive);
boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive); logger.setAdditive(additive);
boolean additive = OptionHelper.toBoolean(additivityStr, true); addInfo("Setting additivity of logger [" + loggerName + "] to " + additive); logger.setAdditive(additive);
@Override public void begin(InterpretationContext ic, String name, Attributes attributes) { // See LBCLASSIC-225 (the system property is looked up first. Thus, it overrides // the equivalent property in the config file. This reversal of scope priority is justified // by the use case: the admin trying to chase rogue config file String debugAttrib = OptionHelper.getSystemProperty(DEBUG_SYSTEM_PROPERTY_KEY); if (debugAttrib == null) { debugAttrib = ic.subst(attributes.getValue(INTERNAL_DEBUG_ATTR)); } if (OptionHelper.isEmpty(debugAttrib) || debugAttrib.equalsIgnoreCase("false") || debugAttrib.equalsIgnoreCase("null")) { addInfo(INTERNAL_DEBUG_ATTR + " attribute not set"); } else { StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); } processScanAttrib(ic, attributes); ContextUtil contextUtil = new ContextUtil(context); contextUtil.addHostNameAsProperty(); // the context is turbo filter attachable, so it is pushed on top of the // stack ic.pushObject(getContext()); LoggerContext lc = (LoggerContext) context; boolean packagingData = OptionHelper.toBoolean( ic.subst(attributes.getValue(PACKAGING_DATA_ATTR)), LoggerContext.DEFAULT_PACKAGING_DATA); lc.setPackagingDataEnabled(packagingData); }
public void begin(InterpretationContext ic, String name, Attributes attributes) { threshold = System.currentTimeMillis(); // See LOGBACK-527 (the system property is looked up first. Thus, it overrides // the equivalent property in the config file. This reversal of scope priority is justified // by the use case: the admin trying to chase rogue config file String debugAttrib = getSystemProperty(DEBUG_SYSTEM_PROPERTY_KEY); if (debugAttrib == null) { debugAttrib = ic.subst(attributes.getValue(INTERNAL_DEBUG_ATTR)); } if (OptionHelper.isEmpty(debugAttrib) || debugAttrib.equalsIgnoreCase("false") || debugAttrib.equalsIgnoreCase("null")) { addInfo(INTERNAL_DEBUG_ATTR + " attribute not set"); } else { StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); } processScanAttrib(ic, attributes); LoggerContext lc = (LoggerContext) context; boolean packagingData = OptionHelper.toBoolean(ic.subst(attributes.getValue(PACKAGING_DATA_ATTR)), LoggerContext.DEFAULT_PACKAGING_DATA); lc.setPackagingDataEnabled(packagingData); if (EnvUtil.isGroovyAvailable()) { ContextUtil contextUtil = new ContextUtil(context); contextUtil.addGroovyPackages(lc.getFrameworkPackages()); } // the context is turbo filter attachable, so it is pushed on top of the // stack ic.pushObject(getContext()); }
public void begin(InterpretationContext ic, String name, Attributes attributes) { threshold = System.currentTimeMillis(); // See LOGBACK-527 (the system property is looked up first. Thus, it overrides // the equivalent property in the config file. This reversal of scope priority is justified // by the use case: the admin trying to chase rogue config file String debugAttrib = getSystemProperty(DEBUG_SYSTEM_PROPERTY_KEY); if (debugAttrib == null) { debugAttrib = ic.subst(attributes.getValue(INTERNAL_DEBUG_ATTR)); } if (OptionHelper.isEmpty(debugAttrib) || debugAttrib.equalsIgnoreCase("false") || debugAttrib.equalsIgnoreCase("null")) { addInfo(INTERNAL_DEBUG_ATTR + " attribute not set"); } else { StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); } processScanAttrib(ic, attributes); LoggerContext lc = (LoggerContext) context; boolean packagingData = OptionHelper.toBoolean(ic.subst(attributes.getValue(PACKAGING_DATA_ATTR)), LoggerContext.DEFAULT_PACKAGING_DATA); lc.setPackagingDataEnabled(packagingData); if (EnvUtil.isGroovyAvailable()) { ContextUtil contextUtil = new ContextUtil(context); contextUtil.addGroovyPackages(lc.getFrameworkPackages()); } // the context is turbo filter attachable, so it is pushed on top of the // stack ic.pushObject(getContext()); }
public void begin(InterpretationContext ic, String name, Attributes attributes) { threshold = System.currentTimeMillis(); // See LOGBACK-527 (the system property is looked up first. Thus, it overrides // the equivalent property in the config file. This reversal of scope priority is justified // by the use case: the admin trying to chase rogue config file String debugAttrib = getSystemProperty(DEBUG_SYSTEM_PROPERTY_KEY); if (debugAttrib == null) { debugAttrib = ic.subst(attributes.getValue(INTERNAL_DEBUG_ATTR)); } if (OptionHelper.isEmpty(debugAttrib) || debugAttrib.equalsIgnoreCase("false") || debugAttrib.equalsIgnoreCase("null")) { addInfo(INTERNAL_DEBUG_ATTR + " attribute not set"); } else { StatusListenerConfigHelper.addOnConsoleListenerInstance(context, new OnConsoleStatusListener()); } processScanAttrib(ic, attributes); LoggerContext lc = (LoggerContext) context; boolean packagingData = OptionHelper.toBoolean(ic.subst(attributes.getValue(PACKAGING_DATA_ATTR)), LoggerContext.DEFAULT_PACKAGING_DATA); lc.setPackagingDataEnabled(packagingData); if (EnvUtil.isGroovyAvailable()) { ContextUtil contextUtil = new ContextUtil(context); contextUtil.addGroovyPackages(lc.getFrameworkPackages()); } // the context is turbo filter attachable, so it is pushed on top of the // stack ic.pushObject(getContext()); }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }
@Override public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { SaxEventRecorder recorder = new SaxEventRecorder(context); this.attributeInUse = null; this.optional = OptionHelper.toBoolean(attributes.getValue(OPTIONAL_ATTR), false); if (!checkAttributes(attributes)) { return; } InputStream in = getInputStream(ec, attributes); try { if (in != null) { parseAndRecord(in, recorder); // remove the <included> tag from the beginning and </included> from the end trimHeadAndTail(recorder); // offset = 2, because we need to get past this element as well as the end element ec.getJoranInterpreter().getEventPlayer().addEventsDynamically(recorder.saxEventList, 2); } } catch (JoranException e) { addError("Error while parsing " + attributeInUse, e); } finally { close(in); } }