我正在使用mavn项目和selenium和log4j日志记录。 log4j的配置是
log4j.rootLogger = DEBUG,文件log4j.logger.org.apache = WARN log4j.logger.httpclient = WARN log4j.appender.file = org.apache.log4j.RollingFileAppender进行 log4j.appender.file.File = $ {}日志/log_text.log log4j.appender.file.MaxFileSize = 5MB log4j.appender.file.MaxBackupIndex = 10 log4j.appender.file.layout = org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern =%d {yyyy-MM-dd HH:mm:ss} %-5p%c {1}:%L - %m%n
但是在我的日志文件中,我获取了HTTP日志的日志以及我在代码中给出的日志命令。请帮助我获取我的日志或如何避免在Selenium中记录Http日志。
Http日志我在日志文件中获取如下
http-outgoing-8<< "内容长度:102 [\ R] [\ n]的" http-outgoing-8<< "内容类型:应用/ JSON;字符集= UTF-8 [\ R] [\ n]的" HTTP出射-8- << "连接:关闭[\ R] [\ n]的" http-outgoing-8<< " [\ R] [\ n]的" http-outgoing-8<< " {"的sessionId":" 50963105f111f728f5901c2a44af28de""状态":0,"值" {" ELEMENT&# 34;:" 0.8072388418087275-2"}}" http-outgoing-8<< HTTP / 1.1 200确定
Log4j v1.2.17