log4net: How to store data in DB

Budda picture Budda · Nov 29, 2010 · Viewed 12.1k times · Source

I am planning to replace few different logging mechanism with the only 1. Also I would like to store data not in file, but in DB.

For this purpose I am planning to choose log4net. But looking on the documentation I don't see a way to configure it to use DB as logs storage.

Am I missed something? Could you please point me if there is a way to store data in DB using log4net. And how to do that?

Thanks a lot!

Answer

D'Arcy Rittich picture D'Arcy Rittich · Nov 29, 2010

There is a good runthrough here:

How to store log in database using log4net

Also the log4net Config Examples show how to setup the config for most databases.