Include “Application Name” in Exception Logging

SimpsonA

New Member
I'm working out an implementation of ELMAH in a web application that logs exceptions to a SQL Server. That's inconsequential, however. My goal is to include the application name in the log so I can easily identify the offending application at a glance when checking error reports. I've searched far and wide spending hours trying to find a solution. I've included \[code\]Application Name=[myApp]\[/code\] in my SQL Server connection string, but that only helps me to identify the app during a SQL Server trace and not in my actual error logging.Has anyone done this? Here is an example of a log record in my database. I would like to see the Application Name listed as well. This happens to be the ELMAH implementation of the table, but it could just as well have been a custom table with the same field.
9MSJ2.png
I would think this should be as simple as adding a value to the \[code\]web.config\[/code\] or something, but I can't seem to find any solution like that or any other. I should probably also note that I'm using IIS 7.5 and .NET 4.0 in case that has anything to do with it. :)
 
Back
Top