log4j2 - Why can't create newly log file including daily date by using DailyRollingFileAppender? -


I appender, "DailyRollingFileAppender'm trying to configure log4j framework using" and as usual date new log file I want to make {log.txt.2014-04-22 ", but it failed.

this is my log4j.properties.

  Logpath = c: \ \ logFilename = log Txt log4j.rootlogger = DEBUG, FILE log4j.appender.FILE = org.apache.log4j.DailyRollingFileAppender log4j.appender.FILE.File = $ {Logpath} $ {Logfailnam} log4j.appender.FILE.ImmediateFlush = true Log4j.appender.FILE.Append = true log4j.appender.FILE.DatePattern = '.' Yyyy-MM-dd log4j.appender.FILE.layout = org.apache.log4j.PatternLayout log 4j.appender.FILE.layout.ConversionPattern =% d {yyyy -mm-DD HH: MM: SS} |% p |% Although I am successful in making an examination through Junit, the log file is "log.txt.2014-04- 22 was not made right. "it's coming" log.txt "was created as  

Remember me? Please give me advice. Thank you very much.

The file date was not attached today Will not. If you change the date system and applications run log. The new file will be created with txt and old files will be added with the date.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -