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 Vijay Joshi <vj...@info-one.com> on 2001/01/16 21:25:47 UTC
Buffering issues
Hi
We are using log4j package for logging. Wanted to know more about
buffering used in log4j. There is one configuration parameter
'ImmediateFlush' for FileAppender, according to log4j documentation if
this parameter is false, messages won't be written to log file
immediately(meaning buffering is there) how about buffer size ? can it
be configured.?
Also we have tested with ImmediateFlush value as true/false and there is
no significant difference, log messages are written instantly to the log
files.
Thanks in advance for help.
Vijay Kumar Joshi
S/w Developer
Info-One
1901 Bascom Ave.
Campbell CA
Re: Buffering issues
Posted by Ceki Gulcu <cg...@urbanet.ch>.
Vijay,
Tests have shown that there is no performance increase when the buffer size
is increased so we don't provide it as an option.
You will notice a performance increase when ImmediateFlush is off, if the
messages you are writing are short. In the typical case however, your
messages (date+thread+category+message...) will be at least 50 characters
long so there won't be an earthshaking performance gain by turning
immediate flush off.
You are welcome to do your own tests and debunk these assertions. Ceki
At 12:25 16.01.2001 -0800, you wrote:
>Hi
>
>We are using log4j package for logging. Wanted to know more about
>buffering used in log4j. There is one configuration parameter
>'ImmediateFlush' for FileAppender, according to log4j documentation if
>this parameter is false, messages won't be written to log file
>immediately(meaning buffering is there) how about buffer size ? can it
>be configured.?
>
>Also we have tested with ImmediateFlush value as true/false and there is
>no significant difference, log messages are written instantly to the log
>files.
>
>Thanks in advance for help.
---
Freedom as in the capacity to exercise choice.