Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is elmah.mvc log file located

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

like image 855
ShaneKm Avatar asked Jul 16 '13 14:07

ShaneKm


1 Answers

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>
like image 166
Russ Swift Avatar answered Sep 22 '22 22:09

Russ Swift