View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2009, 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  package chapter11;
11  
12  import org.apache.log4j.Logger;
13  import org.apache.log4j.PropertyConfigurator;
14  
15  /**
16   * A minimal application making use of log4j and TrivialLog4jAppender.
17   * 
18   * @author Ceki Gülcü
19   *
20   */
21  public class Log4jMain {
22  
23    static Logger logger = Logger.getLogger(Log4jMain.class);
24  
25    public static void main(String[] args) {
26      PropertyConfigurator.configure("src/main/java/chapter11/log4jTrivial.properties");
27      logger.debug("Hello world");
28    }
29  
30  }