简体   繁体   中英

log4j:WARN No appenders could be found for logger / Please initialize the log4j system properly while executing tests through Selenium in Eclipse

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.

This log messages...

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.

...implies that the following:

  • log4j JARs were downloaded and added to the Java Build Path of this project.
  • log4j.properties file was created.
  • Both of the above items was used by a program/script with in the same Project Space .

Reason

As in your current Java program/file you havn't initialized/handled the log4j configuration properly hence you see those WARNINGS .

Conclusion

These WARN messages are harmless and doesn't impact your tests and you can live with it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM