logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/tests/src/java/org/apache/joran/action HelloAction.java
Date Wed, 31 Mar 2004 19:45:44 GMT
ceki        2004/03/31 11:45:44

  Modified:    tests/src/java/org/apache/joran InterpreterTest.java
               src/java/org/apache/joran Interpreter.java
               tests/src/java/org/apache/joran/action HelloAction.java
  Log:
  
  - All 6 tests seem to pass. 
  
  - The Joran Interpreter seems to handle rules (both explicit and implicit) as it should.
  - Next step is documenting Joran and the new features it brings.
  
  Revision  Changes    Path
  1.3       +1 -3      logging-log4j/tests/src/java/org/apache/joran/InterpreterTest.java
  
  Index: InterpreterTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/joran/InterpreterTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InterpreterTest.java	31 Mar 2004 19:34:16 -0000	1.2
  +++ InterpreterTest.java	31 Mar 2004 19:45:43 -0000	1.3
  @@ -341,8 +341,6 @@
       Interpreter jp = new Interpreter(rs);
       ExecutionContext ec = jp.getExecutionContext();
       HashMap omap = ec.getObjectMap();
  -    omap.put(ActionConst.APPENDER_BAG, new HashMap());
  -    ec.pushObject(LogManager.getLoggerRepository());
   
       SAXParser saxParser = createParser();
       saxParser.parse("file:input/joran/newRule1.xml", jp);
  @@ -351,7 +349,7 @@
       assertEquals("Hello John Doe.", str);
     }
     
  -  public static Test suite() {
  +  public static Test xsuite() {
       TestSuite suite = new TestSuite();
       //suite.addTest(new InterpreterTest("testBasicLoop"));
       //suite.addTest(new InterpreterTest("testParsing1"));
  
  
  
  1.2       +2 -0      logging-log4j/src/java/org/apache/joran/Interpreter.java
  
  Index: Interpreter.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/joran/Interpreter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Interpreter.java	31 Mar 2004 19:02:14 -0000	1.1
  +++ Interpreter.java	31 Mar 2004 19:45:43 -0000	1.2
  @@ -30,6 +30,8 @@
   import java.util.Stack;
   import java.util.Vector;
   
  +// TODO Errors should be reported in Error objects instead of just strings.
  +// TODO Interpreter should set its own ErrorHander for XML parsing errors.
   
   public class Interpreter extends DefaultHandler {
     static final Logger logger = Logger.getLogger(Interpreter.class);
  
  
  
  1.7       +1 -1      logging-log4j/tests/src/java/org/apache/joran/action/HelloAction.java
  
  Index: HelloAction.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/joran/action/HelloAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HelloAction.java	31 Mar 2004 19:34:16 -0000	1.6
  +++ HelloAction.java	31 Mar 2004 19:45:44 -0000	1.7
  @@ -35,7 +35,7 @@
      *
      */
     public void begin(ExecutionContext ec, String name, Attributes attributes) {
  -    String str = "Hello "+name+".";
  +    String str = "Hello "+attributes.getValue("name")+".";
       ec.getObjectMap().put("hello", str);
     }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message