1   /**
2    * LOGBack: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 1999-2006, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  
11  package ch.qos.logback.core.joran.action.ext;
12  
13  
14  import org.xml.sax.Attributes;
15  
16  import ch.qos.logback.core.Layout;
17  import ch.qos.logback.core.joran.action.Action;
18  import ch.qos.logback.core.joran.spi.InterpretationContext;
19  
20  
21  
22  public class StackCounterAction extends Action {
23   Layout layout;
24  
25  
26    public StackCounterAction() {
27    }
28  
29    public void begin(InterpretationContext ec, String name, Attributes attributes) {
30      //String str = "Pushing "+name+"-begin";
31      ec.pushObject(name+"-begin");
32    }
33  
34    public void end(InterpretationContext ec, String name) {
35      ec.pushObject(name+"-end");    
36    }
37  
38    public void finish(InterpretationContext ec) {
39    }
40  }