Why is Log4Net not creating log file in production?
Posted
by uriDium
on Stack Overflow
See other posts from Stack Overflow
or by uriDium
Published on 2009-08-22T14:01:00Z
Indexed on
2010/06/17
9:03 UTC
Read the original article
Hit count: 202
I am using VS2005, a website project, a web deployment project and Log4Net. I can use logging when I am developing locally. I can see the log files and everything is fine. When I build my website, (using the web deployment project), I use the deploy as a single DLL option. When I then check the locations of where my log files should be I cannot see any files.
Is there a way to troubleshoot this. I don't think adding the debug value to the App Settings will help because I don't have a console because it is a website.
EDIT I don't want the 150 rep to go to waste so one last time. I compared the internal trace from my dev environment to the trace from the production. My dev environment trace shows the call the Xml Configurator where the production one does not. I have code in the global.asax on application_start() method. I put debug code in there and it is getting called in dev but not in production.
I think this is where the web deployment project is causing some issues. Does the global.asax get compiled into the single DLL? When I do a build in the deployment directory I see a global.compiled file. Must this go into the bin folder in production? Or is the global.asax code in the single DLL? Having both in the bin folder or the just the DLL didn't change anything.
© Stack Overflow or respective owner