Where is elmah.mvc log file located

ShaneKm picture ShaneKm · Jul 16, 2013 · Viewed 9.7k times · Source

After installing elmah.mvc from nuget:

where is the log file created by default?

Errors are logged just fine when I go to /myapp/elmah however I don't see where the actual log file resides. thanks

Answer

Russ Swift picture Russ Swift · Jul 16, 2013

Look at the bottom of the myapp/elmah page for "This log is provided by the..." to see what type of logging you're using. If it's In-Memory, there is no physical file. Otherwise, the location of the file is specified by logPath in web.config, such as...

 <elmah>
  <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~\App_Data\" />
 </elmah>

EDIT

I don't want to just replace the original code snippet because it might have worked for some people; for me it didn't and actually I had to change logPath a bit like that:

 <elmah>
  <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
 </elmah>