Package ch.qos.logback.core.joran.spi

Examples of ch.qos.logback.core.joran.spi.Pattern


  protected void addDefaultNestedComponentRegistryRules(DefaultNestedComponentRegistry registry) {
   
  }
 
  protected Pattern initialPattern() {
    return new Pattern();
  }
View Full Code Here


  public void startElement(String namespaceURI, String localName, String qName,
      Attributes atts) {

    String tagName = getTagName(localName, qName);
    globalPattern.push(tagName);
    Pattern current = (Pattern) globalPattern.clone();
    saxEventList.add(new StartEvent(current, namespaceURI, localName, qName,
        atts, getLocator()));
  }
View Full Code Here

  protected void addDefaultNestedComponentRegistryRules(DefaultNestedComponentRegistry registry) {

  }

  protected Pattern initialPattern() {
    return new Pattern();
  }
View Full Code Here

  @Override
  public void addInstanceRules(RuleStore rs) {
    // parent rules already added
    super.addInstanceRules(rs);

    rs.addRule(new Pattern("configuration"), new ConfigurationAction());

    rs.addRule(new Pattern("*/evaluator"), new EvaluatorAction());
    rs.addRule(new Pattern("*/evaluator/matcher"),
        new MatcherAction());

    rs.addRule(new Pattern("configuration/logger"), new LoggerAction());
    rs.addRule(new Pattern("configuration/logger/level"), new LevelAction());

    rs.addRule(new Pattern("configuration/root"), new RootLoggerAction());
    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());
    rs
        .addRule(new Pattern("configuration/appender/layout"),
            new LayoutAction());
   
    // add jmxConfigurator only if we have JMX available.
    // If running under JDK 1.4 (retrotranslateed logback) then we
    // might not have JMX.
    if(PlatformInfo.hasJMXObjectName()) {
      rs.addRule(new Pattern("configuration/jmxConfigurator"), new JMXConfiguratorAction());
    }
    rs.addRule(new Pattern("configuration/include"), new IncludeAction());
   
    rs.addRule(new Pattern("configuration/consolePlugin"), new ConsolePluginAction());
  }
View Full Code Here

  }

  @Override
  protected void addInstanceRules(RuleStore rs) {
  
    rs.addRule(new Pattern("configuration/property"),
        new PropertyAction());
   
    rs.addRule(new Pattern("configuration/substitutionProperty"),
        new PropertyAction());
   
    // 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());
  }
View Full Code Here

  protected void addDefaultNestedComponentRegistryRules(DefaultNestedComponentRegistry registry) {
   
  }
 
  protected Pattern initialPattern() {
    return new Pattern();
  }
View Full Code Here

    }

    try {
      addInfo("About to add new Joran parsing rule [" + pattern + ","
          + actionClass + "].");
      ec.getJoranInterpreter().getRuleStore().addRule(new Pattern(pattern),
          actionClass);
    } catch (Exception oops) {
      inError = true;
      errorMsg = "Could not add new Joran parsing rule [" + pattern + ","
          + actionClass + "]";
View Full Code Here

  public JoranConfigurator() {
  }

  public void addInstanceRules(RuleStore rs) {

    rs.addRule(new Pattern("configuration"), new ConfigurationAction());

    rs.addRule(new Pattern("configuration/evaluator"), new EvaluatorAction());
    rs.addRule(new Pattern("configuration/evaluator/matcher"),
        new MatcherAction());

    rs.addRule(new Pattern("configuration/logger"), new LoggerAction());
    rs.addRule(new Pattern("configuration/logger/level"), new LevelAction());

    rs.addRule(new Pattern("configuration/root"), new RootLoggerAction());
    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());
    rs
        .addRule(new Pattern("configuration/appender/layout"),
            new LayoutAction());
  }
View Full Code Here

  protected void addDefaultNestedComponentRegistryRules(DefaultNestedComponentRegistry registry) {
   
  }
 
  protected Pattern initialPattern() {
    return new Pattern();
  }
View Full Code Here

  }

  @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());
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.joran.spi.Pattern

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.