albertocolom / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Unable to view error details with XmlFileErrorLog #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Unable to view the details of a error while using the XmlFileErrorLog as
the data store.

This happens because the error is stored in a filename with the format,
error-{0}-{1}.xml where 0 = timestamp and 1 = errorId.

When the method GetError(string id) tries to read the error file the search
pattern is wrong since it doesn't take into account the timestamp part of
the filename.  

(Line203 - XmlFileErrorLog.cs)
string[] files = Directory.GetFiles(LogPath, string.Format("error-{0}.xml",
id));

To fix this issue, line 203 of XmlFileErrorLog.cs should read

string[] files = Directory.GetFiles(LogPath,
string.Format("error-*-{0}.xml", id));

Original issue reported on code.google.com by diamondz...@googlemail.com on 6 Sep 2007 at 1:34

GoogleCodeExporter commented 8 years ago

Original comment by azizatif on 6 Sep 2007 at 1:37

GoogleCodeExporter commented 8 years ago
Fixed in r155.

Original comment by azizatif on 24 Sep 2007 at 8:46