Package ch.qos.logback.core.joran

Examples of ch.qos.logback.core.joran.TrivialConfigurator


    rulesMap.put(new ElementSelector("*/if/then/*"), new NOPAction());
    rulesMap.put(new ElementSelector("*/if/else"), new ElseAction());
    rulesMap.put(new ElementSelector("*/if/else/*"), new NOPAction());
    rulesMap.put(new ElementSelector("x/include"), new IncludeAction());
   
    tc = new TrivialConfigurator(rulesMap);
    tc.setContext(context);
  }
View Full Code Here


    rulesMap.put(new ElementSelector("*/if/then"), new ThenAction());
    rulesMap.put(new ElementSelector("*/if/then/*"), new NOPAction());
    rulesMap.put(new ElementSelector("*/if/else"), new ElseAction());
    rulesMap.put(new ElementSelector("*/if/else/*"), new NOPAction());

    tc = new TrivialConfigurator(rulesMap);
    tc.setContext(context);
  }
View Full Code Here

    HashMap<ElementSelector, Action> rulesMap = new HashMap<ElementSelector, Action>();
    rulesMap.put(new ElementSelector("x"), new NOPAction());
    rulesMap.put(new ElementSelector("x/include"), new IncludeAction());
    rulesMap.put(new ElementSelector("x/stack"), stackAction);

    tc = new TrivialConfigurator(rulesMap);
    tc.setContext(context);
  }
View Full Code Here

  @Test
  public void testBasic() throws JoranException {
    ListenAction listenAction = new ListenAction();
   
    rulesMap.put(new ElementSelector("fire"), listenAction);
    TrivialConfigurator gc = new TrivialConfigurator(rulesMap);

    gc.setContext(context);
    gc.doConfigure(CoreTestConstants.TEST_SRC_PREFIX + "input/joran/fire1.xml");
   
    //for(SaxEvent se: listenAction.getSeList()) {
    //  System.out.println(se);
    //}
    assertEquals(5, listenAction.getSeList().size());
View Full Code Here

  @Test
  public void testReplay() throws JoranException {
    ListenAction listenAction = new ListenAction();
   
    rulesMap.put(new ElementSelector("fire"), listenAction);
    TrivialConfigurator gc = new TrivialConfigurator(rulesMap);

    gc.setContext(context);
    gc.doConfigure(CoreTestConstants.TEST_SRC_PREFIX + "input/joran/fire1.xml");
   
//    for(SaxEvent se: listenAction.getSeList()) {
//      System.out.println(se);
//    }
    assertEquals(5, listenAction.getSeList().size());
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.joran.TrivialConfigurator

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.