You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by François BARBE <fb...@yahoo.fr> on 2002/06/26 09:34:49 UTC

Pb RollingFileAppender

Hi all,

I try to use a RollingFileAppender but it doesn't work....

I want to roll over 3 files and to have 1024KB for the max size.
Here the configuration I use:

<appender name="MediaFwk" class="org.apache.log4j.FileAppender">
  <param name="MaxFileSize" value="1024KB" />
  <param name="MaxBackupIndex" value="3" />

  <param name="File" value="tracesFwk.txt" />
  <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
    <param name="ConversionPattern"
           value="%d{HH:mm:ss};%p;%b;%m;%n"/>
  </layout>
</appender>

I've got my log, but there's always 1 file and its size can go over 1024KB...
What's wrong ?

Thanks
Francois

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pb RollingFileAppender

Posted by François BARBE <fb...@yahoo.fr>.
Oups, sorry for this mistake.

The right configuration is :
<appender name="MediaFwk" class="org.apache.log4j.RollingFileAppender">
   <param name="MaxFileSize" value="1024KB" />
   <param name="MaxBackupIndex" value="3" />

   <param name="File" value="tracesFwk.txt" />
   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
     <param name="ConversionPattern"
            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
   </layout>
</appender>

but it doesn't work...



 --- Ceki Gülcü <ce...@qos.ch> a écrit : > 
> Where is the rub?
> 
> <appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> 
> At 17:34 26.06.2002 +0200, François BARBE wrote:
> >yep, I guess it is, but the size is not bigger for just few KB...
> >the size steal increase during the execution.
> >
> >  --- Ceki Gülcü <ce...@qos.ch> a écrit :
> > >
> > > It is normal if the size of the files is not exactly 1024KB. Keep in mind
> > > that the last appended logging event is not truncated.
> > >
> > > At 09:34 26.06.2002 +0200, François BARBE wrote:
> > > >Hi all,
> > > >
> > > >I try to use a RollingFileAppender but it doesn't work....
> > > >
> > > >I want to roll over 3 files and to have 1024KB for the max size.
> > > >Here the configuration I use:
> > > >
> > > ><appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> > > >   <param name="MaxFileSize" value="1024KB" />
> > > >   <param name="MaxBackupIndex" value="3" />
> > > >
> > > >   <param name="File" value="tracesFwk.txt" />
> > > >   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
> > > >     <param name="ConversionPattern"
> > > >            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
> > > >   </layout>
> > > ></appender>
> > > >
> > > >I've got my log, but there's always 1 file and its size can go over 
> > 1024KB...
> > > >What's wrong ?
> > > >
> > > >Thanks
> > > >Francois
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pb RollingFileAppender

Posted by François BARBE <fb...@yahoo.fr>.
It's OK,

I do few more test and it's work fine ! :o)

Thanks.

 --- Ceki Gülcü <ce...@qos.ch> a écrit : > 
> Where is the rub?
> 
> <appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> 
> At 17:34 26.06.2002 +0200, François BARBE wrote:
> >yep, I guess it is, but the size is not bigger for just few KB...
> >the size steal increase during the execution.
> >
> >  --- Ceki Gülcü <ce...@qos.ch> a écrit :
> > >
> > > It is normal if the size of the files is not exactly 1024KB. Keep in mind
> > > that the last appended logging event is not truncated.
> > >
> > > At 09:34 26.06.2002 +0200, François BARBE wrote:
> > > >Hi all,
> > > >
> > > >I try to use a RollingFileAppender but it doesn't work....
> > > >
> > > >I want to roll over 3 files and to have 1024KB for the max size.
> > > >Here the configuration I use:
> > > >
> > > ><appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> > > >   <param name="MaxFileSize" value="1024KB" />
> > > >   <param name="MaxBackupIndex" value="3" />
> > > >
> > > >   <param name="File" value="tracesFwk.txt" />
> > > >   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
> > > >     <param name="ConversionPattern"
> > > >            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
> > > >   </layout>
> > > ></appender>
> > > >
> > > >I've got my log, but there's always 1 file and its size can go over 
> > 1024KB...
> > > >What's wrong ?
> > > >
> > > >Thanks
> > > >Francois
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pb RollingFileAppender

Posted by Ceki Gülcü <ce...@qos.ch>.
Where is the rub?

<appender name="MediaFwk" class="org.apache.log4j.FileAppender">

At 17:34 26.06.2002 +0200, François BARBE wrote:
>yep, I guess it is, but the size is not bigger for just few KB...
>the size steal increase during the execution.
>
>  --- Ceki Gülcü <ce...@qos.ch> a écrit :
> >
> > It is normal if the size of the files is not exactly 1024KB. Keep in mind
> > that the last appended logging event is not truncated.
> >
> > At 09:34 26.06.2002 +0200, François BARBE wrote:
> > >Hi all,
> > >
> > >I try to use a RollingFileAppender but it doesn't work....
> > >
> > >I want to roll over 3 files and to have 1024KB for the max size.
> > >Here the configuration I use:
> > >
> > ><appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> > >   <param name="MaxFileSize" value="1024KB" />
> > >   <param name="MaxBackupIndex" value="3" />
> > >
> > >   <param name="File" value="tracesFwk.txt" />
> > >   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
> > >     <param name="ConversionPattern"
> > >            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
> > >   </layout>
> > ></appender>
> > >
> > >I've got my log, but there's always 1 file and its size can go over 
> 1024KB...
> > >What's wrong ?
> > >
> > >Thanks
> > >Francois

--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pb RollingFileAppender

Posted by François BARBE <fb...@yahoo.fr>.
yep, I guess it is, but the size is not bigger for just few KB...
the size steal increase during the execution.

 --- Ceki Gülcü <ce...@qos.ch> a écrit : 
> 
> It is normal if the size of the files is not exactly 1024KB. Keep in mind 
> that the last appended logging event is not truncated.
> 
> At 09:34 26.06.2002 +0200, François BARBE wrote:
> >Hi all,
> >
> >I try to use a RollingFileAppender but it doesn't work....
> >
> >I want to roll over 3 files and to have 1024KB for the max size.
> >Here the configuration I use:
> >
> ><appender name="MediaFwk" class="org.apache.log4j.FileAppender">
> >   <param name="MaxFileSize" value="1024KB" />
> >   <param name="MaxBackupIndex" value="3" />
> >
> >   <param name="File" value="tracesFwk.txt" />
> >   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
> >     <param name="ConversionPattern"
> >            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
> >   </layout>
> ></appender>
> >
> >I've got my log, but there's always 1 file and its size can go over 1024KB...
> >What's wrong ?
> >
> >Thanks
> >Francois
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pb RollingFileAppender

Posted by Ceki Gülcü <ce...@qos.ch>.
It is normal if the size of the files is not exactly 1024KB. Keep in mind 
that the last appended logging event is not truncated.

At 09:34 26.06.2002 +0200, François BARBE wrote:
>Hi all,
>
>I try to use a RollingFileAppender but it doesn't work....
>
>I want to roll over 3 files and to have 1024KB for the max size.
>Here the configuration I use:
>
><appender name="MediaFwk" class="org.apache.log4j.FileAppender">
>   <param name="MaxFileSize" value="1024KB" />
>   <param name="MaxBackupIndex" value="3" />
>
>   <param name="File" value="tracesFwk.txt" />
>   <layout class="amt.tech.fwk.journalsortie.FwkPatternLayout">
>     <param name="ConversionPattern"
>            value="%d{HH:mm:ss};%p;%b;%m;%n"/>
>   </layout>
></appender>
>
>I've got my log, but there's always 1 file and its size can go over 1024KB...
>What's wrong ?
>
>Thanks
>Francois

--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>