You can have a look here, I think this is exactly what you need.
Note that if you want to use log4net from a client application and write to a database, you might want to consider to put a service in between. In that case you can easily write your own log4net adapter that calls your LogService (fire and forget) that logs into your database (probably using MSMQ).