0

i am using mavn project and selenium with log4j logging. The configuration of log4j is

log4j.rootLogger = DEBUG, file log4j.logger.org.apache=WARN log4j.logger.httpclient=WARN log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=${log}/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

But in my log file, I'm getting logs of HTTP logs alongwith log command whichever i have given in my code. Please help me on to get only my logs or How to avoid logging Http logs in Selenium.

Http logs I'm getting in log file as follows

http-outgoing-8 << "Content-Length:102[\r][\n]" http-outgoing-8 << "Content-Type:application/json; charset=utf-8[\r][\n]" http-outgoing-8 << "Connection:close[\r][\n]" http-outgoing-8 << "[\r][\n]" http-outgoing-8 << "{"sessionId":"50963105f111f728f5901c2a44af28de","status":0,"value":{"ELEMENT":"0.8072388418087275-2"}}" http-outgoing-8 << HTTP/1.1 200 OK

Log4j v1.2.17

sri ram
  • 9
  • 2
  • 6
  • 1
    Check this thread, may be useful: [link](https://stackoverflow.com/questions/4915414/disable-httpclient-logging) or [link](https://stackoverflow.com/questions/12935923/how-to-disable-log4j-logging-in-http-client-4-1-to-log-to-fileappender) – Kuldeep Kamune Nov 14 '17 at 13:00
  • Thanks for the link.. Its fine now... – sri ram Nov 19 '17 at 13:16

0 Answers0