需要删除硒中的日志文件警告 [英] Need to Remove Log File Warning in Selenium

查看:96
本文介绍了需要删除硒中的日志文件警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我的Selenium软件包中的 log4j.properties .

I am using the log4j.properties in My Selenium Package.

每次运行模块时,总是在控制台和Applications.log文件中添加以下三行.

Every Time I run the Module the below 3 Lines are always been added in the Console and the Applications.log file.

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.

作为参考,下面是 log4j.properties 代码:

For Reference, below is the log4j.properties Code:

#Application Logs
log4j.logger.devpinoyLogger = DEBUG,dest1
log4j.appender.dest1=org.apache.log4j.RollingFileAppender
log4j.appender.dest1.maxFileSize= 5000KB
log4j.appender.dest1.maxBackupIndex=3
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%d{dd/MM/YYYY HH:mm:ss} %m%n
log4j.appender.dest1.File=D:\\Automation\\src\\Logs\\Application.log
#do not append the old file .Create a new log File everytime
log4j.appender.dest1.Append=false

请让我知道需要进行哪些更改,以便从控制台输出和应用程序日志中删除三行警告.

Please let me know what needs to be change in order to remove the 3 lines of Warnings from the console output and Application logs.

推荐答案

请在代码中包含以下代码段:

Please include the following snippet to your code:

System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Jdk14Logger");

希望这会有所帮助!

这篇关于需要删除硒中的日志文件警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆