plkumar / elmah

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

Cannot set ApplicationName for XmlFileErrorLog #389

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to assign an application name for XmlFileErrorLog
2. The specified application name is ignored

What is the expected output? What do you see instead?
I expect the XmlFileErrorLog to honor the specified appplication name. Non-web 
projects don't have an HttpContext for application name inference and the user 
shouldn't be forced to use a SqlErrorLog for just this functionality.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by carlos.e...@gmail.com on 3 Apr 2015 at 7:32

GoogleCodeExporter commented 9 years ago
XmlFileErrorLog is designed to be user as an error log store that is local to 
the application so the application name distinction isn't necessary. This is in 
contrast to, say, SqlErrorLog where the same database could be used by multiple 
applications and where the application distinction and isolation becomes more 
pronounced.

If you still require the application name to be honoured for your scenario 
(would like to still hear how this is more generally applicable), you could 
subclass XmlFileErrorLog and override the Log method to establish specific 
application name.

Original comment by azizatif on 5 Apr 2015 at 10:38

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 5 Apr 2015 at 10:38