elmah / Elmah

Error Logging Modules & Handlers for ASP.NET
https://elmah.github.io/
Apache License 2.0
306 stars 65 forks source link

Would it possible to read external config files? #419

Closed MarkEdward-BarS closed 7 years ago

MarkEdward-BarS commented 7 years ago

Hi,

I'm currently trying to set up Elmah to log errors to a central database for multiple client systems.

I need to log a unique Application Name for each system, but as we use a standardised web.config, with external config files to store unique system settings, I've struggled to setup Elmah with a unique Application Name, as this would need to be placed in an external config file, and Elmah doesn't seem to allow the use of file or configSource attributes.

Is this something that could be added to future versions? Or something I could achieve now, but am too stupid to see how?

Could I set the applicationName of the ErrorLog programmatically? I tried with the following code, with no success.

Dim logger As Elmah.ErrorLog = Elmah.ErrorLog.GetDefault(Nothing)
logger.ApplicationName = "Testing 123"

Any feedback or advicewould be much appreciated.

Mark