Thanks for the response and Idea.

I opted for using a rollover that includes 12 in the afternoon
'.'yyyy-MM-dd-a

and I was able to confirm it did in fact roll over when I logged an hour
past noon (1pm).  More than that, we'll see!

Best,
Lucas


On Wed, May 21, 2014 at 3:33 PM, Thorsten Schöning <tschoen...@am-soft.de>wrote:

> Guten Tag Lucas Vickers,
> am Mittwoch, 21. Mai 2014 um 19:56 schrieben Sie:
>
> > I'm pretty sure the answer is that it must be actively logging, and
> > that does in fact make sense since I doubt you are trying to
> > actively parse log files.
>
> No we don't, but the more interesting question is if the app hast to
> log shortly after midnight to rollover or if hours after midnight is
> enough if it's the first log statement. But I don't know the answer.
> ;-)
>
> > So I guess the question is how do I set
> > the daily rollover to happen at a certain hour, rather than at midnight?
>
> I don't think you can't.
>
>
> http://logging.apache.org/log4cxx/apidocs/classlog4cxx_1_1_daily_rolling_file_appender.html
>
> What about a different approach? This way you are not tied to logging
> occurring shortly after midnight, but need to take care about unneeded
> files on your own.
>
>         <appender       name="monthSpecificLogFile"
>
> class="org.apache.log4j.rolling.RollingFileAppender">
>                 <rollingPolicy
>  class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>                         <param  name="FileNamePattern"
>
> value="..\..\..\Datenserver\Logdateien\dbxml\dbxml\${mandant}\%d{yyyy-MM}.log"
>                         />
>                 </rollingPolicy>
>                 <layout class="org.apache.log4j.PatternLayout">
>                         <param  name="ConversionPattern"
>                                         value="%d{yyyy-MM-dd HH:mm:ss,SSS}
> %p> %c.%M: %m%n"
>                         />
>                 </layout>
>                 <param  name="append"
>                                 value="true"
>                 />
>         </appender>
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail:thorsten.schoen...@am-soft.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
>

Reply via email to