R – can log4net be configured to run under its own identity


I'm thinking about using log4net in a MOSS(SharePoint) 2007 project, but I need to know if the logging can easily be configured to log using a certain username + password.

Best Solution

Doesn't look like it (based on a quick flick through the documentation), but you could certainly create a wrapper class for Log4Net that uses impersonation to perform the logging as your required user

Impersonation and Delegation in .NET 2.0 (Should be the same techniques for 3.5)