How to initialize log4j properly?

前端 未结 24 3026
太阳男子
太阳男子 2020-11-22 06:49

After adding log4j to my application I get the following output every time I execute my application:

log4j:WARN No appenders could be found for logger (slideselec         


        
24条回答
  •  无人及你
    2020-11-22 06:58

    If you just get rid of everything (e.g. if you are in tests)

    org.apache.log4j.BasicConfigurator.configure(new NullAppender());
    

提交回复
热议问题