1 package com.iqjava.log4j;
2
3 import org.apache.log4j.BasicConfigurator;
4 import org.apache.log4j.Logger;
5
6 public class ExampleLog4j {
7
8
9 static final Logger logger = Logger.getLogger(ExampleLog4j.class);
10
11 public static void main(String[] args) {
12 BasicConfigurator.configure();
13 logger.debug("Here goes the debug message");
14 logger.error("Here goes the error message");
15 logger.fatal("Here goes the fatal message");
16 logger.info("Here goes the info message");
17 logger.warn("Here goes the warn message");
18 }
19 }
20