Good morning

 

You can tell log4net to flush the buffer on specific events (see Evaluator 
property in the class log4net.Appender.BufferingAppenderSkeleton). However, you 
can have exactly one buffer size for each buffering appender because every 
appender has exactly one buffer. You could configure multiple appenders for 
every domain you have and thus every domain can have its own buffer size.

 

Changing the buffer size at runtime sounds dangerous to me and therefore I 
discourage you to try that, but if you know what you are doing take a look at 
http://stackoverflow.com/questions/2458227/why-isnt-my-log4net-appender-buffering
 and remember to call ActivateOptions() after changing the BufferSize.

 

Cheers

 

Von: d_k [mailto:mail...@gmail.com] 
Gesendet: Donnerstag, 12. Juni 2014 06:25
An: Log4NET User
Betreff: Re: set buffersize conditionally?

 

Well, you can have a different configuration file for each application and set 
their values accordingly.

 

On Thu, Jun 12, 2014 at 6:59 AM, tirath.g <tirat...@hotmail.com 
<mailto:tirat...@hotmail.com> > wrote:

hi,

is it possible to set buffersize conditionally. i am trying to use log4net
for entire orgnaziation solution and writing info to a database table. can i
set different values of buffer size programically depending on some
condition( like request coming from application 1 to use buffer size = 100
others to use 1). thankyou.



--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/set-buffersize-conditionally-tp48117.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

 

Reply via email to