You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two issues
===========
1) When an error is logged, I want to add contextual information to help in
debugging the error.
For e.g. whenever there is a SQLException while executing a stored
procedure, I generally log the database connection string (without
credentials), sp name, sp parameter names and values etc. I have other
"state" which I want to dump to the log too.
2) I want to log an exception to multiple sinks based on severity of the
exception. I am thinking along the lines of the Logging Application block
configuration - where you can attach multiple listeners based on logentry
category.
Solution I am thinking off
==========================
1) Create an Interface for this purpose. Make sure all custom exceptions
(in all web apps in the company) implement this interface. This interface
will have two read only public properties ( severity and IDictionary). I
decided on dictionary with basic types (string), so that it is easy to
deserialize the Elmah "Error" object.
2) At run time the developer creates an instance of the dictionary and logs
the required state in the dictionary as key, value pairs.
3) At run time set the priority property to appropriate value. Most
probably create an Enum list (high, low, medium etc.)
4) Throw the custom exception.
Now, what is the best way to implement the functionality in ELMAH. My thoughts:
Create some sort of configuration schema in web.config, read it in a new
HttpModule object and send the information to multiple sinks
In the Error class, read the IDictionary object and create XML element for
each key value pair.
Thanks
Arvind
Original issue reported on code.google.com by asheri...@yahoo.com on 12 Oct 2007 at 5:21
The text was updated successfully, but these errors were encountered:
Another type of contextual information that I would like to log is information
that
would allow identification of the specific user using the application at the
time
that the error occurred.
Original comment by BCaseyHa...@gmail.com on 6 Nov 2007 at 6:34
This issue has been migrated to:
https://github.com/elmah/Elmah/issues/40
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of
any further development.
Original comment by azizatif on 25 Aug 2015 at 8:15
Original issue reported on code.google.com by
asheri...@yahoo.com
on 12 Oct 2007 at 5:21The text was updated successfully, but these errors were encountered: