rs.addRule(new ElementSelector("configuration/logger/appender-ref"), new AppenderRefAction<ILoggingEvent>()); rs.addRule(new ElementSelector("configuration/root/appender-ref"), new AppenderRefAction<ILoggingEvent>());
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below in the config file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@Override protected void addInstanceRules(RuleStore rs) { // is "configuration/variable" referenced in the docs? rs.addRule(new ElementSelector("configuration/variable"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/property"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/timestamp"), new TimestampAction()); rs.addRule(new ElementSelector("configuration/define"), new DefinePropertyAction()); // the contextProperty pattern is deprecated. It is undocumented // and will be dropped in future versions of logback rs.addRule(new ElementSelector("configuration/contextProperty"), new ContextPropertyAction()); rs.addRule(new ElementSelector("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new ElementSelector("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction()); rs.addRule(new ElementSelector("configuration/appender/appender-ref"), new AppenderRefAction()); rs.addRule(new ElementSelector("configuration/newRule"), new NewRuleAction()); rs.addRule(new ElementSelector("*/param"), new ParamAction()); }
String errMsg = "Could not find an AppenderAttachable at the top of execution stack. Near [" + tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); String msg = "Could not find an appender named [" + appenderName + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
rs.addRule(new ElementSelector("configuration/root/level"), new LevelAction()); rs.addRule(new ElementSelector("configuration/logger/appender-ref"), new AppenderRefAction()); rs.addRule(new ElementSelector("configuration/root/appender-ref"), new AppenderRefAction());
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@SuppressWarnings("deprecation") @Override public void addInstanceRules(RuleStore rs) { // parent rules already added super.addInstanceRules(rs); rs.addRule(new ElementSelector("configuration"), new ConfigurationAction()); rs.addRule(new ElementSelector("configuration/contextName"), new ContextNameAction()); rs.addRule(new ElementSelector("configuration/contextListener"), new LoggerContextListenerAction()); rs.addRule(new ElementSelector("configuration/appender/sift"), new SiftAction()); rs.addRule(new ElementSelector("configuration/appender/sift/*"), new NOPAction()); rs.addRule(new ElementSelector("configuration/logger"), new LoggerAction()); rs.addRule(new ElementSelector("configuration/logger/level"), new LevelAction()); rs.addRule(new ElementSelector("configuration/root"), new RootLoggerAction()); rs.addRule(new ElementSelector("configuration/root/level"), new LevelAction()); rs.addRule(new ElementSelector("configuration/logger/appender-ref"), new AppenderRefAction<ILoggingEvent>()); rs.addRule(new ElementSelector("configuration/root/appender-ref"), new AppenderRefAction<ILoggingEvent>()); rs.addRule(new ElementSelector("configuration/include"), new IncludeAction()); rs.addRule(new ElementSelector("configuration/includes"), new FindIncludeAction()); rs.addRule(new ElementSelector("configuration/includes/include"), new ConditionalIncludeAction()); rs.addRule(new ElementSelector("configuration/receiver"), new ReceiverAction()); }
String errMsg = "Could not find an AppenderAttachable at the top of execution stack. Near [" + tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); String msg = "Could not find an appender named [" + appenderName + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
rs.addRule(new Pattern("configuration/root/level"), new LevelAction()); rs.addRule(new Pattern("configuration/logger/appender-ref"), new AppenderRefAction()); rs.addRule(new Pattern("configuration/root/appender-ref"), new AppenderRefAction());
String errMsg = "Could not find an AppenderAttachable at the top of execution stack. Near [" + tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); String msg = "Could not find an appender named [" + appenderName + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new ElementSelector("configuration/property"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/timestamp"), new TimestampAction()); rs.addRule(new ElementSelector("configuration/shutdownHook"), new ShutdownHookAction()); rs.addRule(new ElementSelector("configuration/define"), new DefinePropertyAction()); rs.addRule(new ElementSelector("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new ElementSelector("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction<E>()); rs.addRule(new ElementSelector("configuration/appender/appender-ref"), new AppenderRefAction<E>()); rs.addRule(new ElementSelector("configuration/newRule"), new NewRuleAction()); rs.addRule(new ElementSelector("*/param"), new ParamAction()); }
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@Override public void addInstanceRules(RuleStore rs) { super.addInstanceRules(rs); rs.addRule(new ElementSelector("configuration"), new ConfigurationAction()); rs.addRule(new ElementSelector("configuration/appender-ref"), new AppenderRefAction<IAccessEvent>()); rs.addRule(new ElementSelector("configuration/appender/sift"), new SiftAction()); rs.addRule(new ElementSelector("configuration/appender/sift/*"), new NOPAction()); rs.addRule(new ElementSelector("configuration/evaluator"), new EvaluatorAction()); // add if-then-else support rs.addRule(new ElementSelector("*/if"), new IfAction()); rs.addRule(new ElementSelector("*/if/then"), new ThenAction()); rs.addRule(new ElementSelector("*/if/then/*"), new NOPAction()); rs.addRule(new ElementSelector("*/if/else"), new ElseAction()); rs.addRule(new ElementSelector("*/if/else/*"), new NOPAction()); rs.addRule(new ElementSelector("configuration/include"), new IncludeAction()); }
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new Pattern("configuration/property"), new PropertyAction()); rs.addRule(new Pattern("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new Pattern("configuration/timestamp"), new TimestampAction()); // the contextProperty pattern is deprecated. It is undocumented // and will be dropped in future versions of logback rs.addRule(new Pattern("configuration/contextProperty"), new ContextPropertyAction()); rs.addRule(new Pattern("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new Pattern("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new Pattern("configuration/appender"), new AppenderAction()); rs.addRule(new Pattern("configuration/appender/appender-ref"), new AppenderRefAction()); rs.addRule(new Pattern("configuration/newRule"), new NewRuleAction()); rs.addRule(new Pattern("*/param"), new ParamAction()); }
+ tagName + "] line " + getLineNumber(ec); inError = true; addError(errMsg); return; addError(errMsg); + "]. Did you define it below instead of above in the configuration file?"; inError = true; addError(msg); addError("See " + CoreConstants.CODES_URL + "#appender_order for more details."); return; addInfo("Attaching appender named [" + appenderName + "] to " + appenderAttachable); appenderAttachable.addAppender(appender);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new Pattern("configuration/variable"), new PropertyAction()); rs.addRule(new Pattern("configuration/property"), new PropertyAction()); rs.addRule(new Pattern("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new Pattern("configuration/timestamp"), new TimestampAction()); rs.addRule(new Pattern("configuration/define"), new DefinePropertyAction()); // the contextProperty pattern is deprecated. It is undocumented // and will be dropped in future versions of logback rs.addRule(new Pattern("configuration/contextProperty"), new ContextPropertyAction()); rs.addRule(new Pattern("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new Pattern("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new Pattern("configuration/appender"), new AppenderAction()); rs.addRule(new Pattern("configuration/appender/appender-ref"), new AppenderRefAction()); rs.addRule(new Pattern("configuration/newRule"), new NewRuleAction()); rs.addRule(new Pattern("*/param"), new ParamAction()); }
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new Pattern("configuration/variable"), new PropertyAction()); rs.addRule(new Pattern("configuration/property"), new PropertyAction()); rs.addRule(new Pattern("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new Pattern("configuration/timestamp"), new TimestampAction()); rs.addRule(new Pattern("configuration/define"), new DefinePropertyAction()); // the contextProperty pattern is deprecated. It is undocumented // and will be dropped in future versions of logback rs.addRule(new Pattern("configuration/contextProperty"), new ContextPropertyAction()); rs.addRule(new Pattern("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new Pattern("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new Pattern("configuration/appender"), new AppenderAction()); rs.addRule(new Pattern("configuration/appender/appender-ref"), new AppenderRefAction()); rs.addRule(new Pattern("configuration/newRule"), new NewRuleAction()); rs.addRule(new Pattern("*/param"), new ParamAction()); }
@Override protected void addInstanceRules(RuleStore rs) { // is "configuration/variable" referenced in the docs? rs.addRule(new ElementSelector("configuration/variable"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/property"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/substitutionProperty"), new PropertyAction()); rs.addRule(new ElementSelector("configuration/timestamp"), new TimestampAction()); rs.addRule(new ElementSelector("configuration/shutdownHook"), new ShutdownHookAction()); rs.addRule(new ElementSelector("configuration/define"), new DefinePropertyAction()); // the contextProperty pattern is deprecated. It is undocumented // and will be dropped in future versions of logback rs.addRule(new ElementSelector("configuration/contextProperty"), new ContextPropertyAction()); rs.addRule(new ElementSelector("configuration/conversionRule"), new ConversionRuleAction()); rs.addRule(new ElementSelector("configuration/statusListener"), new StatusListenerAction()); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction<E>()); rs.addRule(new ElementSelector("configuration/appender/appender-ref"), new AppenderRefAction<E>()); rs.addRule(new ElementSelector("configuration/newRule"), new NewRuleAction()); rs.addRule(new ElementSelector("*/param"), new ParamAction(getBeanDescriptionCache())); }