Hi,
i Was wondering what people are using for logging in .net. We have log4net here, but am looking to do it async and to a database with a nice viewer.
What are the popular choices??
Regards.
Hi,
i Was wondering what people are using for logging in .net. We have log4net here, but am looking to do it async and to a database with a nice viewer.
What are the popular choices??
Regards.
We simply log to the database on error because we are a heavily used OLTP system.
If the DB goes down, then the system is down: asynch logging when the phones are red hot is redundant...
I've seen references to people having used the Microsoft Enterprise Library logging facility, in combination with MSMQ, to achieve asynchronous logging. No help on the viewer.
Log4Net delivers log messages to appenders synchronously, but the appenders can behave asynchronously according to this. The SqlServerAppender has a bufferSize property that controls how many log events are collected in the buffer before they are written to the database. If that doesn't meet your needs, you could write your own appender. A reply in this post appears to give a working example.
When we did this, we simply wrote to a simple internal queue and had a thread do the actual write. This way our code that was logging is minimally impacted, and the simple queue and thread managed keeping us up to date.