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