My website is running as an ASP.NET user in IIS. I've created one virtual directory, 'Logs', which is internally pointing to my shared drive folder which is access by a limited number of users. How can I create a log file on the virtual directory with log4net?
Do I (or can I) provide user credentials when I create the logger or the file?
It looks like there's no problem writing log files to a virtual directory on your website. You just tell log4net that the path is relative to the current directory by writing the configuration
Now, if you want to put the current username in the log message, you'll want to investigate log4net Contexts. Stashing the current user in the log4net context
And pulling it out in the Appender layout