import org.apache.log4j.*;
public class Log {
public static void main(String[] args) {
Logger log = Logger.getLogger(Log.class);
PropertyConfigurator.configure("log.properties");
log.debug("Hello this is a debug message");
log.info("Hello this is an info message");
}
}
Error is :- log4j:WARN No appenders could be found for logger (log.Log). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
org.apache.log4j.ConsoleAppender
– vsnyc