BAEL-4724 Fixing log4j's "no appender found" warning (#10802)

This commit is contained in:
polomos
2021-06-05 05:26:27 +02:00
committed by GitHub
parent d51bc8bb54
commit 836e9b479c
3 changed files with 25 additions and 0 deletions
@@ -0,0 +1,18 @@
package com.baeldung.log4j;
import org.apache.log4j.Logger;
public class NoAppenderExample {
private final static Logger logger = Logger.getLogger(NoAppenderExample.class);
public static void main(String[] args) {
//Setup default appender
//BasicConfigurator.configure();
//Define path to configuration file
//PropertyConfigurator.configure("src\\main\\resources\\log4j.properties");
logger.info("Info log message");
}
}