Monday, May 3, 2010

Maxim 6: Always include a root cause

This maxim comes coutesy of Ian. When a failure occurs and you either log it or return it to a higher layer in the stack, always include the root case. Also if there are important variables involved in the exception, like the destination ip, you should add that to the exception message.

2 comments:

Nagender Parimi said...
This comment has been removed by the author.
Nagender Parimi said...

Agreed. I suggest logging critical bits like credit card and SSN numbers as well