arttuladhar
12/2/2012 - 2:54 AM

Java log4j Tutorial

Java log4j Tutorial

package com.aayush.logging;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;

public class Intro1 {

	public static Logger logger = Logger.getLogger(Intro1.class);
	
	public static void main(String[] args) {
		System.out.println("Hello World, Sorry I would be using log4j");
		BasicConfigurator.configure();
		
		logger.error("Hello log4j");

	}

}