Module 7 Log File not created with Log4j | Selenium Forum
M
Posted on 27/02/2016
[b:2jh1cjcx]Step1 :[/b:2jh1cjcx]

[u:2jh1cjcx][i:2jh1cjcx]Created Log4j.properties File in Source Folder with below script [almost as per Video][/i:2jh1cjcx][/u:2jh1cjcx]

log4j.logger.devpinoyLogger=DEBUG,dest1
log4j.appender.dest1=org.apache.log4j.RollingFileAppender
log4j.appender.dest1.maxFileSize=5000KB
log4j.appender.dest1.File=E:\\SeleniumSoftwares
log4j.appender.dest1.Append=false

Step2 :
Created class File
import org.apache.log4j.Logger;


public class Test_Log4j {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Logger APPLICATION_LOGS = Logger.getLogger("devpinoyLogger");
APPLICATION_LOGS.debug("Starting");
APPLICATION_LOGS.debug("Executing");
APPLICATION_LOGS.debug("Ending");
}

}
[b:2jh1cjcx][i:2jh1cjcx][u:2jh1cjcx]
RESULT : lOG file not created, warning as below[/u:2jh1cjcx][/i:2jh1cjcx][/b:2jh1cjcx]

log4j:WARN No appenders could be found for logger (devpinoyLogger).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Please help me for Result

M
Replied on 29/02/2016

http://stackoverflow.com/questions/12532339/no-appenders-could-be-found-for-loggerlog4j