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.
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.
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.
I would highly recommend looking into NLOG. It's very flexible and logs asynchronously. You can configure it to log to a specific file or DB. However, you'll need to build your own log viewer.
We use NLOG religiously and couldn't be happier with it.
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.
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...
Try logFaces, it's centralized log server, aggregator and viewer, works nicely with log4net UDP appender.
Disclosure: I am the author of this product.