@Override protected void addInstanceRules(RuleStore rs) { super.addInstanceRules(rs); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction<ILoggingEvent>()); }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { addInfo("Popping appender named [" + appender.getName() + "] from the object stack"); ec.popObject(); } } }
private void warnDeprecated(String className) { if (className.equals("ch.qos.logback.core.ConsoleAppender")) { addWarn("ConsoleAppender is deprecated for LogcatAppender"); } }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); warnDeprecated(className); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
@Override protected void addInstanceRules(RuleStore rs) { super.addInstanceRules(rs); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction()); }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction<IAccessEvent>()); }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new Pattern("configuration/appender"), new AppenderAction()); }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
@Override protected void addInstanceRules(RuleStore rs) { rs.addRule(new Pattern("configuration/appender"), new AppenderAction()); }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
addError("Missing class name for appender. Near [" + localName + "] line " + getLineNumber(ec)); inError = true; return; addInfo("About to instantiate appender of type [" + className + "]"); addWarn("No appender name given for appender of type " + className + "]."); } else { appender.setName(appenderName); addInfo("Naming appender as [" + appenderName + "]"); } catch (Exception oops) { inError = true; addError("Could not create an Appender of type [" + className + "].", oops); throw new ActionException(oops);
@Override protected void addInstanceRules(RuleStore rs) { super.addInstanceRules(rs); rs.addRule(new ElementSelector("configuration/appender"), new AppenderAction<ILoggingEvent>()); }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }