My log4j properties file
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} %c %m%n
log4j.appender.dest1.File=C:\\Selenium\\eclipse-jee-juno-SR1-win32\\eclipse\\Workspace\\Core_Hybrid\\src\\com\\logs\\Application.log
log4j.appender.dest1.Append=false
I get the Error msg as stated below :
log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
log4j:WARN Please initialize the log4j system properly.
I have placed my properties files inside the src folder and imported the log4j.jar in the build path.
Please help on this
As I remember the log4j.properties
file must be in the root-directory
of the execution and added to the classPath. So this means the file must be on the same level as the src-Folder
and not within this folder. Or you have to change the root-directory of your execution to your src-folder.
There's a typo in your configuration file. Remove the last ',' in the first line:
log4j.logger.devpinoyLogger=DEBUG, dest1
You should define a root logger to avoid such "No appender" warning.
log4j.rootLogger=DEBUG, dest1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With