Search code examples
javalog4jappender

All appenders for log4J


I try to run a medium sized programm with a lot of external jars but I always get the warning "log4j:WARN No appenders could be found for logger XYZ". Sure, I have to add the specific Appender to my log4j.properties but if I add this one, next run misses another one.

So, is there any way to find all needed appenders in external jars besides starting, adding appender, starting, adding appender.. and so on until there is no more warning?


Solution

  • You can either configure root logger which is a parent of all other loggers:

    log4j.rootLogger=DEBUG, Appender
    

    or configure most common top level loggers like com, org and net.