Ron,

This does really sound like a job for the database, e.g. a DTS package
in MS SQL Server. The AsoNetAppender is complicated enough :)

See below for answers: 
 
> The down side is that NeedsFlush() will be called for each 
> <tableMaintence> node after every log message if the buffer 
> size of the base appender is set to 1. I'd like to add some 
> sort of Timer so that the statements are called ever 
> <interval> seconds and not just when log statements are 
> written. I understand the code in this article:
> 
>  http://www.eggheadcafe.com/articles/20040916.asp
> 
> but I'd rather not add a HttpModule to the web.config for my 
> appender to work. Is it possible to create a static array of 
> Timers; one timer for each interval? My gut tells me this is 
> a BadIdea. 

You can do this with a queue of TableMaintenance objects, ordered by the
next one that needs to run. Then you only need one timer for the first
thing in the queue. When you process the TableMaintenance object you
need to insert it back into the right place in the queue for its next
execution.


> I want to allow a list of <tableMaintence> nodes to be 
> executed, not just one.
> 
> I know I've asked this question before but I'm not sure how 
> it applies to custom properties on appenders such as the 
> <commandText> node inside of a <tableMaintence> node. Does 
> the value attribute of my <commandText. mode accept PatternStrings?
> 
> <!-- is this syntax valid ??? -->
> <commandText type="log4net.Layout.PatternLayout,log4net">
>  <conversionPattern value="%m" />
> </commandText>

If you mean "log4net.Util.PatternString" then it will work for any
string property anywhere in the XML config file. It will be evaluated at
configuration time and the string value will be set from the evaluated
pattern.


> 
> I know that %m will most likely not contain anything 
> meaningful in this context.
> 
> Thanks,
> Ron
> 

Cheers,

Nicko

Reply via email to