Why I am getting errors on console regarding log4j system initialization
Hi, This would be my first question here. A forum like this is really appreciated.
I got my question from following post
I followed the exact steps given here in order to enable logging for my tests. I was using TestNG for executing tests. My questions are…
1. You mentioned about log4j.xml file only and not anything about log4j.properties file. Is that not necessary at all (I assume it is somewhat required as per http://logging.apache.org/log4j/1.2/faq.html#noconfig)? Are they same thing? I see that in code you mentioned something like
please advise about the differences, usage and cause of not mentioning in your tutorial.
2. When I ran tests, I immediately see errors on console as
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
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 googled this and got some information (not exact but related)
I would be interested in knowing what may be the cause of these errors as well. Please advise for both questions.
Last, I think there is a typo in following…the How to do it… section
1) Download JAR files of Log4j and Add Jars to your project library. You can download it from here. That’s all about configuration of Apache POI with eclipse. Now you are ready to write your test.
It should be
1) Download JAR files of Log4j and Add Jars to your project library. You can download it from here. That’s all about configuration of Log4j with eclipse. Now you are ready to write your test.
That’s it as of now.
Good work on this nice tutorial and entire ToolSQA stuff 🙂