[prev in list] [next in list] [prev in thread] [next in thread] 

List:       logback-user
Subject:    Re: [logback-user] Rolling not working?
From:       Eric Pederson <ericacm () gmail ! com>
Date:       2011-05-26 14:19:07
Message-ID: BANLkTikU-XXK8S9ypgh65B+u2eg25=as8A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all - it was my bad.   My filename pattern was incorrect and put the
rolled file in the wrong directory.

Thanks Henning -

-- Eric



On Thu, May 26, 2011 at 10:08 AM, Henning Juva <henning.juva@gmail.com>wrote:

> Is rolling only triggered by an actual log event happening within the
> configured timeframe and not every minute by itself?
>
> --henning
>
> Sent from my iPhone
>
> On 26. mai 2011, at 15:07, Eric Pederson <ericacm@gmail.com> wrote:
>
> > Dear all:
> >
> > I have the following configuration:
> >
> >   String filename = "notification"
> >   appender("FILE", RollingFileAppender) {
> >     file = (jbossHomeDir ? jbossHomeDir + "/" : "") + "log/" + filename +
> ".log"
> >     rollingPolicy(TimeBasedRollingPolicy) {
> >         fileNamePattern = filename + ".%d{yyyy-MM-dd_HH-mm}.log"
> >         maxHistory = 30
> >     }
> >     encoder(PatternLayoutEncoder) {
> >         pattern = logPattern
> >     }
> >   }
> >
> > I have it set to roll every minute just for testing.   It appears that
> logback is recognizing my configuration correctly:
> >
> > 08:55:56,095 |-INFO in
> ch.qos.logback.classic.gaffer.ConfigurationDelegate@2d7d1491 - About to
> instantiate appender of type
> [ch.qos.logback.core.rolling.RollingFileAppender]
> > 08:55:56,095 |-INFO in
> ch.qos.logback.classic.gaffer.ConfigurationDelegate@2d7d1491 - Naming
> appender as [FILE]
> > 08:55:56,111 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No
> compression will be used
> > 08:55:56,112 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will
> use the pattern notification.%d{yyyy-MM-dd_HH-mm}.log for the active file
> > 08:55:56,117 |-INFO in
> c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date
> pattern is 'yyyy-MM-dd_HH-mm' from file name pattern
> 'notification.%d{yyyy-MM-dd_HH-mm}.log'.
> > 08:55:56,117 |-INFO in
> c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over
> every minute.
> > 08:55:56,117 |-INFO in
> c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting
> initial period to Thu May 26 08:55:27 EDT 2011
> >
> > However, no rolling is happening.
> >
> > Ideas?
> >
> > Thanks,
> >
> > -- Eric
> >
> > _______________________________________________
> > Logback-user mailing list
> > Logback-user@qos.ch
> > http://qos.ch/mailman/listinfo/logback-user
> _______________________________________________
> Logback-user mailing list
> Logback-user@qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>

[Attachment #5 (text/html)]

Hi all - it was my bad.   My filename pattern was incorrect and put the rolled file \
in the wrong directory.<br clear="all"><br><div>Thanks Henning -</div><div><br>-- \
Eric<br><br> <br><br><div class="gmail_quote">On Thu, May 26, 2011 at 10:08 AM, \
Henning Juva <span dir="ltr">&lt;<a \
href="mailto:henning.juva@gmail.com">henning.juva@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">

Is rolling only triggered by an actual log event happening within the<br>
configured timeframe and not every minute by itself?<br>
<br>
--henning<br>
<br>
Sent from my iPhone<br>
<div><div></div><div class="h5"><br>
On 26. mai 2011, at 15:07, Eric Pederson &lt;<a \
href="mailto:ericacm@gmail.com">ericacm@gmail.com</a>&gt; wrote:<br> <br>
&gt; Dear all:<br>
&gt;<br>
&gt; I have the following configuration:<br>
&gt;<br>
&gt;   String filename = &quot;notification&quot;<br>
&gt;   appender(&quot;FILE&quot;, RollingFileAppender) {<br>
&gt;     file = (jbossHomeDir ? jbossHomeDir + &quot;/&quot; : &quot;&quot;) + \
&quot;log/&quot; + filename + &quot;.log&quot;<br> &gt;     \
rollingPolicy(TimeBasedRollingPolicy) {<br> &gt;         fileNamePattern = filename + \
&quot;.%d{yyyy-MM-dd_HH-mm}.log&quot;<br> &gt;         maxHistory = 30<br>
&gt;     }<br>
&gt;     encoder(PatternLayoutEncoder) {<br>
&gt;         pattern = logPattern<br>
&gt;     }<br>
&gt;   }<br>
&gt;<br>
&gt; I have it set to roll every minute just for testing.   It appears that logback \
is recognizing my configuration correctly:<br> &gt;<br>
&gt; 08:55:56,095 |-INFO in \
ch.qos.logback.classic.gaffer.ConfigurationDelegate@2d7d1491 - About to instantiate \
appender of type [ch.qos.logback.core.rolling.RollingFileAppender]<br> &gt; \
08:55:56,095 |-INFO in ch.qos.logback.classic.gaffer.ConfigurationDelegate@2d7d1491 - \
Naming appender as [FILE]<br> &gt; 08:55:56,111 |-INFO in \
c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used<br> &gt; \
08:55:56,112 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the \
pattern notification.%d{yyyy-MM-dd_HH-mm}.log for the active file<br> &gt; \
08:55:56,117 |-INFO in \
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern \
is &#39;yyyy-MM-dd_HH-mm&#39; from file name pattern \
&#39;notification.%d{yyyy-MM-dd_HH-mm}.log&#39;.<br> &gt; 08:55:56,117 |-INFO in \
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over every \
minute.<br> &gt; 08:55:56,117 |-INFO in \
c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial \
period to Thu May 26 08:55:27 EDT 2011<br> &gt;<br>
&gt; However, no rolling is happening.<br>
&gt;<br>
&gt; Ideas?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; -- Eric<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Logback-user mailing list<br>
&gt; <a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
&gt; <a href="http://qos.ch/mailman/listinfo/logback-user" \
target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br> \
_______________________________________________<br> Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://qos.ch/mailman/listinfo/logback-user" \
target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br> \
</blockquote></div><br></div>



_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://qos.ch/mailman/listinfo/logback-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic