I am trying to write a output for my log in file on the desktop but for somereason, it is not doing that.It says the file cant be instantiated.
I have the code and console output below. Any help would be much appreciated. thanks in advance.
direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p - %m%n
log4j.appender.default.file=org.apache.log4j.FileAppender
log4j.appender.default.file.append=true
log4j.appender.default.file.FILE=C:\Users\Gagan\Desktop\logfile\log\mylogfile.log
log4j.appender.default.file.layout=org.apache.log4j.PatternLayout
log4j.appender.default.file.layout.ConversionPattern=%-5p %c: %m%n
log4j.appender.default.file.threshold=INFO,
log4j.rootLogger=warn, stdout, filelog4j:ERROR Could not find value for key log4j.appender.File
log4j:ERROR Could not instantiate appender named "file".
2014/06/30 06:40:43 TRACE - Trace messages
2014/06/30 06:40:43 DEBUG - debug message
2014/06/30 06:40:43 INFO - info message
2014/06/30 06:40:43 WARN - warning
2014/06/30 06:40:43 ERROR - error message
2014/06/30 06:40:43 FATAL - fatal message