Application.log created but not writing into file | Selenium Forum
M
Posted on 24/02/2016
Reg. Hybrid frame work module 19: Application.log file created but file is empty and not writing to it. Not sure why? I googled it but did not get much information. Any idea why it is not writing into file? I appreciate your help.

Thanks,
Vanaja.

M
Replied on 25/02/2016

send the relevant code. i'll check it out.


M
Replied on 01/03/2016

Here is the relevant code:
Driverscript.java:

import org.apache.log4j.Logger;

public class DriverScript {
public Logger APP_LOGS;
public static void main(String[] args){
DriverScript test= new DriverScript();
test.start();
}
private void start() {
// initializing the app logs

APP_LOGS = Logger.getLogger("devpinoyLogger");
//APP_LOGS.debug("Hellooo");
APP_LOGS.debug("hello");

}

}

log4j. properties file 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} %c %m%n
log4j.appender.dest1.File=Users\\Vanaja\\Documents\\workspace\\Sai\\src\\com\\qtpselenium\\logs\\Application.log
#do not append the old file. Create a new log file everytime
log4j.appender.dest1.Append=false


M
Replied on 01/03/2016

i answered this question

http://qtpselenium.com/selenium-tutorial/forum/viewtopic.php?f=20&t=850