We are deploying web parts in SharePoint 2007 and want to enable logging (log4net). The ideal solution is to use a database application to avoid problems understanding which actual server is running the web part.
These questions were helpful: SharePoint and Log4Net .
I have log4net running in a standalone web application using Visual Studio dev server using web.config for the log4net parameters and the file application for output. I would like to go to SharePoint and still use the output of the log file so that I can make sure everything works first and then change the configuration to enter the database.
Will it be too much trouble? How did other developers add log4.net to their SharePoint solutions? Is using a database the only good solution for correlating log output to a server?
Update: we have implemented Log4Net, and it works to a certain extent. The SharePoint Security Model makes it easy to configure the required permissions. In our case, we saw that messages do not fall into the log file in certain cases. We used a registration code in a web service that works as a given account. When we let it work like dev, for example. 'us \ bob', and this developer uses the page that calls the web service, then the messages get to the log file. Another unresolved issue is how to take into account the permissions required to write to the log directory used by the system, that is, IIS logs or SharePoint logs.