logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michaël CATANZARITI <mca...@free.fr>
Subject Re: Buffering Questions
Date Wed, 15 Sep 2004 18:08:03 GMT
Hello the option ImmediateFlush force each new log event to be written immediately to the file.
It can degrade performances, but if your application crashes, the log file is up to date.

The bufferSize option is not implemented still the stl ofstream does not implement it.

Regards,

Michaël

Christophe de VIENNE wrote:
> Hi,
> 
> Barak Simon wrote:
> 
>> Hi,
>> The following questions are about FileAppender and AsyncAppender 
>> buffering:
>>
>> 1. I found an example of how to configure the FileAppender to buffer 
>> the logging events:
>>
>>    <param name="ImmediateFlush" value="false"/>
>>    <param name="BufferedIO" value="true"/>
>>
>>    (a) What's the difference between buffering and not-flushing (are 
>> there 4 distinct combinations I can configure?)
>>    (b) Is there a way to configure the buffer size? (from script that is)
>>  
>>
> 
>  From what I see in the source :
> 
> BufferedIO = true implies ImmediateFlush = false
> 
> ImmediateFlush is handled by WriterAppender, which will do a 
> ostream::flush after each output.
> 
> BufferedIO is specific to FileAppender. The buffer size can be set via 
> the "buffersize" property. However is seems that those properties 
> (bufferedIO and buffersize) will be silently ignored, since the relevant 
> code is commented.
> 
> 
>> 2. I could not find an example in the log4cxx side (there might be one 
>> on the java side) of how to configure the buffer size
>>    for the async appender.
>>  
>>
> Do you mean by configuration script ?
> In the source the function is setBufferSize. I guess a buffersize 
> property is usable in the script. Note that ASyncAppender can only be 
> script configured using an xml file.
> 
>>    (And in general, is there a place where one can find the complete 
>> dtd in use?)
>>  
>>
> I don't know.
> 
> 
> 
> Regards
> 
> Christophe
> 

Mime
View raw message