You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by ha...@pnc.com on 2006/12/14 15:54:03 UTC

AdoNetAppender configuration note

Hello, All.

In case some folks have been wondering why they cannot get the
AdoNetAppender to work, along with maybe also using custom parameter
fields, I found that the log4net documentation and what works for my
projects is different when interfacing with SQL Server 2005.

In the web/app config file in the AdoNetAppender, change the buffersize
from the documented 100 to 1, like so:

<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
      <bufferSize value="1" />
      . . .
The default bufferSize is 512, so not sure why the docs set it at 100.  In
any case, setting it to "1" turns off buffering of the logging events and
sends the transmission synchronously.  Another option may be to increase
the buffer size to some number that is big enough to hold your logging
event, but not buffering seems to work.

Harry


The contents of this email are the property of PNC. If it was not addressed to you, you have no legal right to read it. If you think you received it in error, please notify the sender. Do not forward or copy without permission of the sender. This message may contain an advertisement of a product or service and thus may constitute a commercial electronic mail message under US Law. PNC�s postal address is 249 Fifth Avenue, Pittsburgh, PA 15222. If you do not wish to receive any additional advertising or promotional messages from PNC at this e-mail address, click here to Unsubscribe. https://pnc.p.delivery.net/m/u/pnc/uni/p.asp By unsubscribing to this message, you will be unsubscribed from all advertising or promotional messages from PNC. Removing your e-mail address from this mailing list will not affect your subscription to alerts, e-newsletters or account servicing e-mails.