When to not log exceptions to the event log
Raymond Lewallen : Logging exceptions in your event log
(Via Raymond Lewallen.)
Raymond has a short post showing how to log exceptions to the server event log. I’ve had this bite me in the butt a couple of times. Mostly when my app has been deployed to a cluster.
We have a situation here where our applications are deployed to a seven node cluster with “sticky sessions”. That means that whenever an exception is written to the event log, it’s written to the event log of the server it happened on. That means I have to view the event log for each node in the cluster until I find the one that had the particular exception at the exact time I’m looking for. That’s IF the event log is set to clear itself or is being maintained by the sys admins.
Another problem with the event log is that it isn’t queryable. Well you can query the event log, but it’s a pain and it’s not as flexible as an RDBMS based exception log.
I usually either end up rolling my own error logger, or finding one that works with whatever technology I’m using at the time. I’d list them all here, but there are too many for me to type out. Just Google (or Yahoo or MSN) for “error logger” for whatever technology you are using.
-
http://www.codebetter.com/blogs/raymond.lewallen Raymond Lewallen


