<div dir="ltr">How about :<br><br> String activeLogFile = "a file name of your choice";<br> LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();<br> RollingFileAppender<ILoggingEvent> appender = new RollingFileAppender<ILoggingEvent>();<br>
appender.setContext(loggerContext);<br> appender.setFile(activeLogFile);<br><br> String archiveDir = "a directory of your choice"<br> createIfNeeded(archiveDir);<br> TimeBasedRollingPolicy<ILoggingEvent> timePolicy = new TimeBasedRollingPolicy<ILoggingEvent>();<br>
timePolicy.setFileNamePattern(archiveDir + patternFor("%d{yyyy-MM-dd,aux}/%d{yyyy-MM-dd-hh}")); // hourly<br> .....<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 November 2013 11:09, Per Jørgen Vigdal <span dir="ltr"><<a href="mailto:Per.Jorgen.Vigdal@evry.com" target="_blank">Per.Jorgen.Vigdal@evry.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="NO-BOK">
<div>
<p class="MsoNormal"><span lang="EN-US">Hallo.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is it possible to configure a TimeBasedRollingPolicy so that the file that it is being logged to does not<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">have any date in the filename, but the rolled over files has.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">PerJ<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>