Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Application logging principles
travislaborde
follow
0
11-12-2008 7:39 AM
367 views
tags:
programming
travislaborde
says:
good advice
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
Student Suspended for Cancer Head Shave
Caress me if you can ... (38 pics)
Anyone else getting this error on Clipmarks?
Do these pants make my butt look big?
Man reaches for dog, gets bitten by alligator.
beauty shines through
When Taking Your Children To Work Day Goes Bad
Legendary Lost Persian Army Found in Sahara
The Little Girl Who Can't Cry Or She Might Die
Young Voters
visit the
Top Clips page
View the Top Clips from
November 12, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://www.clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/df19117c-3a62-49d5-a115-3cac1b1e4b07/10291542-4914-4716-995F-D6440137C0F8/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://www.thekua.com/atwork/2008/11/application-logging-principles/" href="http://www.thekua.com/atwork/2008/11/application-logging-principles/" style="font-size: 11px;">www.thekua.com</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/"><H3 id="post-318" class="entrytitle"> <A rel="bookmark" href="http://www.thekua.com/atwork/2008/11/application-logging-principles/"> Application logging principles </A> </H3></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/"><H2>Logging cannot be considered in isolation of the exception handling strategies</H2></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/"><P>As a rule of thumb, my default position on exception handling looks like this:</p> <UL> <li style="margin-left:16px;padding-left: 0px;">If you can handle an exception, recover from it and continue</LI> <li style="margin-left:16px;padding-left: 0px;">If you can’t handle an exception, but you can translate it, then do so and continue. </LI> <li style="margin-left:16px;padding-left: 0px;">If you can’t handle an exception and you won’t translate it, then propagate it to someone who can. </LI></UL></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/">If you’re going to handle an exception, you may choose to log the details.</blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/">If you translate an exception and still propogate that, log the exception <STRONG>only</STRONG> if you aren’t going to propogate it</blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/">If you can’t handle an exception and you won’t translate it, don’t bother logging it. Ensure that someone higher up is going to apply the first two rules.</blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.thekua.com/atwork/2008/11/application-logging-principles/"><H2>Think of what would information would help you at 3am in the morning</H2></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/10291542-4914-4716-995F-D6440137C0F8/blog/" title="blog or email this clip"><img src="http://content7.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Blog
Copyright
Privacy
EULA
OK