I am using a Spring boot app with log4j logging enabled. All is well when I run my Spring boot app, I see the log lines in the correct layout. However, when I run a test, I get:
log4j:WARN No appenders could be found for logger (be.delijn.ritsimulator.util.LoadTimeTest). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
I have tried moving the log4j2.xml file to every possible place on the classpath but I cannot seem to resolve this issue. I placed it in the root, under resources etc. I just want to be able to have 1 log4j2.xml file instead of one for main and one for test. Also, I do not want to set it using the system property.
Is this possible? If so, how can I achieve this?
Thanks in advance! Regards