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 geff henderson chang <ge...@gmail.com> on 2007/04/27 10:49:36 UTC

[HELP] log file larger than specified MaxFileSize.

Hello,

I have 2 different applications that refer to the same log file
(/var/log/errors.log)  using RollingFileAppender.

First log4j.xml specifies a MaxFileSize of 50MB.
Second log4j.xml specifies a a MaxFileSize of 20MB.

Both have ERROR Thresholds.
Both also have MaxBackupIndex of 2.

But log file reaches up to 70+MB. Is this normal?

Regards,
Geff

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Stress Testing Async Appender

Posted by Curt Arnold <ca...@apache.org>.
Don't know any off the top of my head, but keep in mind if you do  
find any that AsyncAppender was considerably rewritten for log4j  
1.2.13 (could be off on the version number, definitely in .14 the  
current release) to eliminate a couple of different issues, so the  
behavior should be significantly improved relative to earlier  
releases.  If you have any concerns regarding it, you should upgrade  
if you are using an earlier version.


On May 3, 2007, at 3:10 PM, Kamal Ahmed wrote:

> Hi,
> Can anyone point me to any info regarding Stress Testing of Log4J
> Appenders, especially Async Appender.
> Thanks,
> -Kamal.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Stress Testing Async Appender

Posted by Kamal Ahmed <KA...@webMethods.com>.
Hi,
Can anyone point me to any info regarding Stress Testing of Log4J
Appenders, especially Async Appender.
Thanks,
-Kamal.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [HELP] log file larger than specified MaxFileSize.

Posted by "Geff Chang [1]" <ge...@gmail.com>.
That sounds good. I'll check it out. Thanks a lot.

James Stauffer wrote:
> You can by having each application send the error logs to a socket
> appender and then have a listener that writes all of them to one file.
> You just shouldn't have multiple applications write to the same file.
>
> On 4/27/07, geff henderson chang <ge...@gmail.com> wrote:
>> Thanks! I guess I will just have to use a different log file for
>> different modules.
>> I was hoping there was a way to log errors into just one file, though.
>> But, thanks! You just made my day.
>>
>> Regards,
>> Geff
>>
>> On 4/27/07, Ceki Gulcu <li...@qos.ch> wrote:
>> >
>> >
>> > geff henderson chang wrote:
>> > > Ceki:
>> > >
>> > > Thanks for the response.
>> >
>> > Sure.
>> >
>> > > I don't have any problems with using other log files.
>> > >
>> > > My current situation is this.
>> > > I have different log4j.xml files for different modules.
>> > > For the error log, they all refer to the same error.log
>> > > But one of them specifies a different maximum size.
>> > >
>> > > BUT, if I set the maximum size equally for all (say, 50MB),
>> > > do you think the error.log file will not go beyond the 50MB size?
>> > >
>> > > Anyway, so this implementation of different modules
>> > > running under different JVMs using the same log file is not 
>> recommended?
>> >
>> > It's even worse than that. As long as multiple appenders open the 
>> same file,
>> > regardless of their host VM, you are bound to run into trouble.
>> >
>> > HTH,
>> >
>> > --
>> > Ceki Gülcü
>> > Logback: The reliable, generic, fast and flexible logging framework 
>> for Java.
>> > http://logback.qos.ch
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>> >
>> >
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [HELP] log file larger than specified MaxFileSize.

Posted by James Stauffer <st...@gmail.com>.
You can by having each application send the error logs to a socket
appender and then have a listener that writes all of them to one file.
 You just shouldn't have multiple applications write to the same file.

On 4/27/07, geff henderson chang <ge...@gmail.com> wrote:
> Thanks! I guess I will just have to use a different log file for
> different modules.
> I was hoping there was a way to log errors into just one file, though.
> But, thanks! You just made my day.
>
> Regards,
> Geff
>
> On 4/27/07, Ceki Gulcu <li...@qos.ch> wrote:
> >
> >
> > geff henderson chang wrote:
> > > Ceki:
> > >
> > > Thanks for the response.
> >
> > Sure.
> >
> > > I don't have any problems with using other log files.
> > >
> > > My current situation is this.
> > > I have different log4j.xml files for different modules.
> > > For the error log, they all refer to the same error.log
> > > But one of them specifies a different maximum size.
> > >
> > > BUT, if I set the maximum size equally for all (say, 50MB),
> > > do you think the error.log file will not go beyond the 50MB size?
> > >
> > > Anyway, so this implementation of different modules
> > > running under different JVMs using the same log file is not recommended?
> >
> > It's even worse than that. As long as multiple appenders open the same file,
> > regardless of their host VM, you are bound to run into trouble.
> >
> > HTH,
> >
> > --
> > Ceki Gülcü
> > Logback: The reliable, generic, fast and flexible logging framework for Java.
> > http://logback.qos.ch
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [HELP] log file larger than specified MaxFileSize.

Posted by geff henderson chang <ge...@gmail.com>.
Thanks! I guess I will just have to use a different log file for
different modules.
I was hoping there was a way to log errors into just one file, though.
But, thanks! You just made my day.

Regards,
Geff

On 4/27/07, Ceki Gulcu <li...@qos.ch> wrote:
>
>
> geff henderson chang wrote:
> > Ceki:
> >
> > Thanks for the response.
>
> Sure.
>
> > I don't have any problems with using other log files.
> >
> > My current situation is this.
> > I have different log4j.xml files for different modules.
> > For the error log, they all refer to the same error.log
> > But one of them specifies a different maximum size.
> >
> > BUT, if I set the maximum size equally for all (say, 50MB),
> > do you think the error.log file will not go beyond the 50MB size?
> >
> > Anyway, so this implementation of different modules
> > running under different JVMs using the same log file is not recommended?
>
> It's even worse than that. As long as multiple appenders open the same file,
> regardless of their host VM, you are bound to run into trouble.
>
> HTH,
>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for Java.
> http://logback.qos.ch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: [HELP] log file larger than specified MaxFileSize.

Posted by Ceki Gulcu <li...@qos.ch>.

geff henderson chang wrote:
> Ceki:
> 
> Thanks for the response.

Sure.

> I don't have any problems with using other log files.
> 
> My current situation is this.
> I have different log4j.xml files for different modules.
> For the error log, they all refer to the same error.log
> But one of them specifies a different maximum size.
> 
> BUT, if I set the maximum size equally for all (say, 50MB),
> do you think the error.log file will not go beyond the 50MB size?
> 
> Anyway, so this implementation of different modules
> running under different JVMs using the same log file is not recommended?

It's even worse than that. As long as multiple appenders open the same file, 
regardless of their host VM, you are bound to run into trouble.

HTH,

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [HELP] log file larger than specified MaxFileSize.

Posted by geff henderson chang <ge...@gmail.com>.
Ceki:

Thanks for the response.
I don't have any problems with using other log files.

My current situation is this.
I have different log4j.xml files for different modules.
For the error log, they all refer to the same error.log
But one of them specifies a different maximum size.

BUT, if I set the maximum size equally for all (say, 50MB),
do you think the error.log file will not go beyond the 50MB size?

Anyway, so this implementation of different modules
running under different JVMs using the same log file is not recommended?

Regards,
Geff

On 4/27/07, Ceki Gulcu <li...@qos.ch> wrote:
>
> Hello Geff,
>
> If both config files refer to the same log file the behavior is unspecified.
> Thus, odd behavior you are observing is "expected".
>
> Can you have the two config files refer to *different* log files?
>
> geff henderson chang wrote:
> > Hello,
> >
> > I have 2 different applications that refer to the same log file
> > (/var/log/errors.log)  using RollingFileAppender.
> >
> > First log4j.xml specifies a MaxFileSize of 50MB.
> > Second log4j.xml specifies a a MaxFileSize of 20MB.
> >
> > Both have ERROR Thresholds.
> > Both also have MaxBackupIndex of 2.
> >
> > But log file reaches up to 70+MB. Is this normal?
>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for Java.
> http://logback.qos.ch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: [HELP] log file larger than specified MaxFileSize.

Posted by Ceki Gulcu <li...@qos.ch>.
Hello Geff,

If both config files refer to the same log file the behavior is unspecified. 
Thus, odd behavior you are observing is "expected".

Can you have the two config files refer to *different* log files?

geff henderson chang wrote:
> Hello,
> 
> I have 2 different applications that refer to the same log file
> (/var/log/errors.log)  using RollingFileAppender.
> 
> First log4j.xml specifies a MaxFileSize of 50MB.
> Second log4j.xml specifies a a MaxFileSize of 20MB.
> 
> Both have ERROR Thresholds.
> Both also have MaxBackupIndex of 2.
> 
> But log file reaches up to 70+MB. Is this normal?

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org