简体   繁体   English

log4j:WARN找不到记录器的附加程序/请在Eclipse中通过Selenium执行测试时正确初始化log4j系统

[英]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 JAR已下载并添加到该项目的Java Build Path中。
  • log4j.properties file was created. log4j.properties文件已创建。
  • Both of the above items was used by a program/script with in the same Project Space . 以上两个项目均由同一Project Space中的程序/脚本使用。

Reason 原因

As in your current Java program/file you havn't initialized/handled the log4j configuration properly hence you see those WARNINGS . 就像在您当前的Java程序/文件中一样,您没有正确初始化/处理log4j配置,因此您会看到那些警告

Conclusion 结论

These WARN messages are harmless and doesn't impact your tests and you can live with it. 这些WARN消息是无害的,不会影响您的测试,您可以接受。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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