[logback-user] CyclicBuffer size in SmtpAppender
Dawson Mossman
dawsonm at lashpoint.com
Wed Oct 20 16:35:29 CEST 2010
Thanks Ceki, does this mean there is NO way to modify the buffer
size? Not even by overriding some methods or extending some classes?
On 20/10/2010 11:32 AM, Ceki Gulcu wrote:
> Hello Dawson,
>
> I suggest that you vote on http://jira.qos.ch/browse/LBCORE-170
>
> Cheers,
>
> On 20.10.2010 15:06, Dawson Mossman wrote:
>> Hi, does anyone know how to change the CyclicBuffer size in the
>> SmtpAppender? When an error occurs and an email is sent via the
>> Appender, I only want it to show the most recent error (no contextual
>> information required). It currently stores 256 contextual logs.
>>
>> Logback version: 0.9.25
>>
>> When I look at the source code for the SMTPAppender, there is a variable
>> named "buffersize", but is not used anywhere in the class. The line
>> directly below it used to use the variable, but it's been commented out.
>> private int bufferSize = 512;
>> //protected CyclicBuffer<ILoggingEvent> cb = new
>> CyclicBuffer<ILoggingEvent>(bufferSize);
>>
>> Can I use a custom evaluator to do this? Or do I need to write a new
>> custom SMTPAppender? Even in the later case, I'm not sure where the
>> buffer size is being defined?
>>
>> Thanks,
>> Dawson
>>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
More information about the Logback-user
mailing list