<font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">My goal is to have my log file roll
over twice a day (one to hold all AM logs, and one to hold all PM logs).
Here is my configuration in logback.xml:</font>
<br>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;appender name=&quot;FILE&quot;
class=&quot;<b>ch.qos.logback.core.rolling.RollingFileAppender</b>&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;file&gt;/opt/apps/weblogs/TransactionReporting/TransactionReporting.log&lt;/file&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;rollingPolicy
class=&quot;<b>ch.qos.logback.core.rolling.TimeBasedRollingPolicy</b>&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&lt;fileNamePattern&gt;/opt/apps/weblogs/TransactionReporting/TransactionReporting.<b>%d{yyyy-MM-dd-a}</b>.gz&lt;/fileNamePattern&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/rollingPolicy&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;encoder&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&lt;pattern&gt;[%date] [%thread] [%level] [%mdc] [%logger:%method:%line]:
%msg%n&lt;/pattern&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/encoder&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;/appender&gt;</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">This configuration does result in the
correct naming of archived log files (e.g. TransactionReporting.2011-03-22-AM.gz).
However, the contents of the archived log files do not just contain half
of the day's log entries.</font>
<br>
<br><font size=2 face="sans-serif">Whether the archived log file name ends
in &quot;...AM.gz&quot; or &quot;...PM.gz&quot; these log files can contain
log entries for both the morning and the evening.</font>
<br>
<br><font size=2 face="sans-serif">And, the same goes for the active log
file (TransactionReporting.log). This active log file does not get archived
when the time changes from AM to PM...so the log file contains log entries
for both the morning and the evening. </font>
<br>
<br><font size=2 face="sans-serif">It seems as if the log file is rolling
over only once a day, but I don't believe that it rolls over at the same
time every day. Based on the modified date value on the archived files,
it seems completely random as to when the file is actually rolled over.</font>
<br>
<br><font size=2 face="sans-serif">Any help or advice would be greatly
appreciated.</font>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Thanks,<br>
<br>
Christopher White<br>
Sr. Programmer<br>
1-617-772-2403<br>
Christopher.White@bbh.com<br>
</font>

*************************** IMPORTANT
NOTE*****************************-- The opinions expressed in this
message and/or any attachments are those of the author and not
necessarily those of Brown Brothers Harriman & Co., its
subsidiaries and affiliates ("BBH"). There is no guarantee that
this message is either private or confidential, and it may have
been altered by unauthorized sources without your or our knowledge.
Nothing in the message is capable or intended to create any legally
binding obligations on either party and it is not intended to
provide legal advice. BBH accepts no responsibility for loss or
damage from its use, including damage from virus.
********************************************************************************