View Javadoc

1   /**
2    * Logback: the reliable, fast and flexible logging library for Java.
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 chapter3.helloWorld;
12  
13  
14  
15  import org.xml.sax.Attributes;
16  
17  import ch.qos.logback.core.joran.action.Action;
18  import ch.qos.logback.core.joran.spi.InterpretationContext;
19  
20  
21  /**
22   * A trivial action that writes "Hello world" on the console.
23   * 
24   * See the HelloWorld class for integrating with Joran.
25   * 
26   * @author Ceki Gülcü
27   */
28  public class HelloWorldAction extends Action {
29    public void begin(InterpretationContext ec, String name, Attributes attributes) {
30      System.out.println("Hello World");
31    }
32  
33    public void end(InterpretationContext ec, String name) {
34    }
35  }