package com.javahonk;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;


public class Log4jTestUsingPropertiesFile {
    
    private static Logger logger = Logger.getLogger(
	    Log4jTestUsingPropertiesFile.class);
	    
    public static void main(String[] args) {
	
	PropertyConfigurator.configure("resources\\log4j.properties");
	
	//Please note logger warn and debug is disable because 
	//TRACE, DEBUG < INFO 
	logger.trace("Logging from properties file");
	logger.debug("Logging from properties file");
	
	//Below will be enabled because 
	//WARN, ERROR, FATAL > INFO
	logger.info("Logging from properties file");
	logger.warn("Logging from properties file");
	logger.error("Logging from properties file");
	logger.fatal("Logging from properties file");
	
    }

}
