Answers for "log4j xml file download"

0

log4j xml file download

package com.vaannila.helloworld;

import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;

public class HelloWorld {

	static Logger logger = Logger.getLogger(HelloWorld.class);
	
	public static void main(String[] args) {
		DOMConfigurator.configure("log4j.xml");
		logger.debug("Sample debug message");
		logger.info("Sample info message");
		logger.warn("Sample warn message");
		logger.error("Sample error message");
		logger.fatal("Sample fatal message");
	}
}
Posted by: Guest on April-15-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language