<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Rock Solid</title>
	
	<link>http://rocksolid.gibraltarsoftware.com</link>
	<description>Notes from the folks behind Gibraltar Software</description>
	<lastBuildDate>Thu, 19 Jan 2012 23:24:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RockSolid" /><feedburner:info uri="rocksolid" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>CodeMash Rocks</title>
		<link>http://feedproxy.google.com/~r/RockSolid/~3/9xsPDDuoRsA/codemash-rocks</link>
		<comments>http://rocksolid.gibraltarsoftware.com/events/codemash-rocks#comments</comments>
		<pubDate>Sun, 15 Jan 2012 19:18:02 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[CodeMash]]></category>
		<category><![CDATA[Jam Session]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://rocksolid.gibraltarsoftware.com/?p=1194</guid>
		<description><![CDATA[Let&#8217;s Rock the House at the CodeMash 2013 Jam Session! CodeMash 2012 was a &#8220;10&#8243; I just got back from CodeMash 2012 &#8211; what a blast! This amazing developer-organized conference took place over three days in the brand new convention center at the Kalahari Resort in Sandusky, Ohio &#8212; a.k.a. America&#8217;s largest indoor waterpark. Inspired talks, awesome people, and [...]]]></description>
			<content:encoded><![CDATA[<dl class="wp-caption alignright" style="width: 325px;">
<dt class="wp-caption-dt"><img class="  " title="OK, we haven't (yet) arranged for Elvis Costello to facilitate the CodeMash 2013 Jam Session. But, parenthetically, I did tour with ?uestLove. He was only 8 at the time and it was his Dad's band -- but I still got a vicarious thrill when he chose the walk-on music for Michelle Bachman's appearance on the Jimmy Fallon show." src="http://www.elviscostello.com/files/news-gallery/news_144-1306507037.jpg" alt="Let's Rock the House at the CodeMash 2013 Jam Session!" width="315" height="236" /></dt>
<dd class="wp-caption-dd">Let&#8217;s Rock the House at the CodeMash 2013 Jam Session!</dd>
</dl>
<h2>CodeMash 2012 was a &#8220;10&#8243;</h2>
<p>I just got back from <a href="http://codemash.org/" target="_blank">CodeMash 2012</a> &#8211; what a blast! This amazing developer-organized conference took place over three days in the brand new convention center at the Kalahari Resort in Sandusky, Ohio &#8212; a.k.a. <a href="http://www.kalahariresorts.com/oh/parks/waterparks/" target="_blank">America&#8217;s largest indoor waterpark</a>. Inspired talks, awesome people, and meticulous planning by a few with generous support from many combined to make for a truly fantastic event.</p>
<p>On a personal note, there were two little details that touched and inspired me.</p>
<ol>
<li><a href="http://about.me/leongersing" target="_blank">Leon Gersing</a> gave a <a title="Leon Gersing (@Rubybuddha) on Love" href="http://www.youtube.com/watch?v=0fm-Qnt4bYc" target="_blank">heartfelt zen-infused pecha kucha talk on Love</a> that reminded us that work/play/family/friends are synergistically intertwined aspects of a life passionately lived &#8211; not competing commitments in a zero-sum game.</li>
<li><a href="http://www.designinginteractive.com/posts" target="_blank">Designing Interactive </a>sponsored a frickin&#8217; <a href="http://www.flickr.com/photos/lsirtosky/6691276793/" target="_blank">Bacon Bar</a>!<br />
 </li>
</ol>
<h2>The Jam Session at CodeMash 2013 will turn it up to &#8220;11&#8243;</h2>
<p>It got me thinking about what I could do to help make some aspect of next year&#8217;s CodeMash a bit more awesome. And it hit me: the Jam Session!</p>
<p>This is near and dear to my heart because I was beating on pianos, organs and various synthesizers for years before I ever touched a computer keyboard. Thanks to <a href="http://www.franklins.net/carl.aspx" target="_blank">Carl Franklin</a> and others, CodeMash has provided space for an open jam session at CodeMash for several years.  But there are a couple challenges with pulling off a great jam session that present opportunities for improvement:</p>
<ol>
<li>Some musicians are a little shy and need a bit of coaxing to feel comfortable jumping in</li>
<li>Occasionally, someone needs a gentle nudge to take a break once in a while</li>
<li>Negotiating what to play next can be tedious and time-consuming</li>
<li>Having the right gear available to play and be heard is easier said than done</li>
</ol>
<p>Creativity flourishes in a bit of structure. I&#8217;ve gotten approval from CodeMash to organize the 2013 Jam Session.  I want to arrange for a house sound system and gear (drum kit, percussion, keys, amps) to be shared as well as working out some simple ways to maximize the fun for players and listeners.  For instance, chord charts and lyric sheets can eliminate a lot of sputtering dead time trying to pick the next song and agree on a key.  Having a sound guy to get instruments miked, blend levels and kill feedback can be a godsend. Having a couple professional (i.e. full-time) musicians to facitate things could help keep things flowing the way a good talk show host makes all the guests sound interesting.</p>
<p>If you&#8217;d like to jam at CodeMash 2013 or have any ideas on how we can amp up the awesome, please share in the comments section below.</p>
<img src="http://feeds.feedburner.com/~r/RockSolid/~4/9xsPDDuoRsA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://rocksolid.gibraltarsoftware.com/events/codemash-rocks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://rocksolid.gibraltarsoftware.com/events/codemash-rocks</feedburner:origLink></item>
		<item>
		<title>You won’t want to miss us at CodeMash!</title>
		<link>http://feedproxy.google.com/~r/RockSolid/~3/uKyb1vF37Y0/heading-to-codemash-and-some-special-opportunities</link>
		<comments>http://rocksolid.gibraltarsoftware.com/gibraltar/heading-to-codemash-and-some-special-opportunities#comments</comments>
		<pubDate>Thu, 05 Jan 2012 05:11:23 +0000</pubDate>
		<dc:creator>Kendall</dc:creator>
				<category><![CDATA[Gibraltar]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Product Names]]></category>

		<guid isPermaLink="false">http://rocksolid.gibraltarsoftware.com/?p=1185</guid>
		<description><![CDATA[We're speaking, exhibiting, showing off new products and giving away free stuff.  If you can at all make it, you should!]]></description>
			<content:encoded><![CDATA[<p><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/logo-codemash.gif"><img class="alignright size-full wp-image-1188" title="logo-codemash" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/logo-codemash.gif" alt="" width="199" height="202" /></a>Next week is <a title="CodeMash" href="http://www.codemash.org">CodeMash 2012 &#8211; January 11-13 </a>at the cool Kalahari resort in Sandusky, OH.  Don&#8217;t worry, it&#8217;s cool you have no idea where that is because in Ohio you&#8217;ll never go outside in January anyway.</p>
<p>If you&#8217;re already planning on attending, that&#8217;s fabulous &#8211; we&#8217;ll be all over, just look for the guys in the dark blue polos.  If you weren&#8217;t planning on it, you should &#8211; you might find some late minute tickets from people that couldn&#8217;t make it.</p>
<p>Whats on tap from us at CodeMash?  A bunch of things:</p>
<ul>
<li><strong>Gary and I are presenting some of our more popular sessions </strong></li>
<li><strong>We&#8217;ll be demoing Gibraltar 3.0</strong> &#8211; with a number of updates not in the previous betas and the first public preview of a completely new part of Gibraltar (oooh!).  Stop by our booth and see everything that&#8217;s new before its public release.</li>
<li><strong>We&#8217;ll be showing off the first experiment to escape from Gibraltar Labs</strong> (find out what it is at CodeMash &#8211; it&#8217;s nothing like anything we&#8217;ve done before!)</li>
<li><strong>We&#8217;ll be running a contest to help us name our new experiment</strong> before it can be released into the wild.  Come up with the best name and you&#8217;ll get a new Kindle Fire.</li>
<li><strong>Along with a few other exhibitors we&#8217;ll be part of ButtonMash</strong> &#8211; stop by our booth to pick up one of our buttons to be entered into the ButtonMash raffle for some really neat prizes.</li>
</ul>
<p>And that&#8217;s just *our* part of the event.  Wow, I&#8217;m gettin&#8217; tired just thinking about it.</p>
<img src="http://feeds.feedburner.com/~r/RockSolid/~4/uKyb1vF37Y0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://rocksolid.gibraltarsoftware.com/gibraltar/heading-to-codemash-and-some-special-opportunities/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://rocksolid.gibraltarsoftware.com/gibraltar/heading-to-codemash-and-some-special-opportunities</feedburner:origLink></item>
		<item>
		<title>Gibraltar 3.0 New Feature Dive – Live Sessions</title>
		<link>http://feedproxy.google.com/~r/RockSolid/~3/0KwZBQQKB1A/gibraltar-3-0-new-feature-dive-live-sessions</link>
		<comments>http://rocksolid.gibraltarsoftware.com/development/logging/gibraltar-3-0-new-feature-dive-live-sessions#comments</comments>
		<pubDate>Thu, 15 Dec 2011 01:58:58 +0000</pubDate>
		<dc:creator>Kendall</dc:creator>
				<category><![CDATA[Gibraltar]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Product Information]]></category>

		<guid isPermaLink="false">http://rocksolid.gibraltarsoftware.com/?p=1001</guid>
		<description><![CDATA[Watch server logs in real time remotely over slow networks with the new Gibraltar Live Session view.]]></description>
			<content:encoded><![CDATA[<p>The Gibraltar Agent has always supported viewing the real time log messages from an application, provided your application was a Windows application (WinForms and WPF) and you were the one running the application.  But, what if you want to see what’s happening inside a Windows Service or a process running somewhere else?  In Gibraltar 2.0 you had to have your process explicitly publish a snapshot of your log data up to a Hub or via email.  This required you to code some way to signal your application when you wanted to publish information and then have all of the data collected in that process since it started get shipped to you.</p>
<p>For Gibraltar 3.0 we’ve introduced a new way of seeing your log data in real time: Live Sessions.  When you enable live sessions you can view log data remotely, efficiently, in real time.  In Analyst you’ll see a new node in the tree view called Live sessions.  When you select that, you’ll see a list of all of the available sessions which you can pick from.</p>
<p>When you first click the Live View tab a data connection is established and you’ll get the last thousand messages that were logged.  Once that data’s come across, new messages are shown as they are recorded.  You can filter the display to show just messages of a particular severity or to search their text for a particular value.</p>
<div id="attachment_1003" class="wp-caption aligncenter" style="width: 550px"><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/Live-View-In-Action.png"><img class="size-large wp-image-1003" title="Live View In Action" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/Live-View-In-Action-1024x602.png" alt="" width="540" height="317" /></a><p class="wp-caption-text">This is your server, live!</p></div>
<p>If you switch away from one session to another the live view stream will continue to run in the background – keeping it current with the most recent thousand messages.  Gibraltar takes steps to keep this memory efficient so you can have multiple live streams running at the same time without performance issues.</p>
<p>If you want to keep watching an application while you work you can double click it and get an independent window which will update in real time as long as the remote application is running.</p>
<h1>Efficient over the Network</h1>
<p>The data stream that’s used by Live Sessions is designed to be very efficient over networks.  It is highly compressed (using the same techniques employed by the Agent to write log files), connection based, and only running when there is an active viewer monitoring the session.  In real world scenarios the live stream for a busy server can be easily viewed over a low bandwidth, intermittent connection like a tethered phone or Mifi.</p>
<ul>
<li>If the connection is lost, the data stream restarts with the last message you received so it can show you all of the messages</li>
<li>If no one is watching a live session then the data is buffered in the Agent but not sent across the network.</li>
</ul>
<h1>Safety First</h1>
<p>There are a number of features designed to make sure live sessions don’t cause a problem to your application:</p>
<ul>
<li><strong>Asynchronous, buffered transmission:</strong>  The Agent publishes data to any set of listeners asynchronously from recording the log file to ensure slow network connections or network connectivity problems won’t slow down recording the main log file.</li>
<li><strong>Drop on overflow:</strong>  If there are more log messages waiting to be sent than can be sent over the network new messages will be dropped instead of holding up the application.  This is in contrast to the log file which will switch to synchronous while it catches up.</li>
<li><strong>Encryption optional:</strong>  You can choose to enable SSL for live session communication so it will be encrypted end-to-end.</li>
</ul>
<h1>Live Sessions and Firewalls</h1>
<p>The Live Session protocol is designed to work with most firewall configurations:</p>
<ul>
<li><strong>All connections are outbound:</strong> The Agent and Analyst establish connections to the central server to communicate.  No connections are directly created between the Agent and Analyst.  This works well with NAT and often requires no explicit firewall rules or exceptions.</li>
<li><strong>Separate ports are used for Agent and Analyst:</strong>  If you need to create a firewall rule you can create separate rules for Agent and Analyst traffic (ports 29970 and 29971 respectively)</li>
<li><strong>Connections are asynchronous:</strong>  Many firewalls will simply fail to respond to attempts to connect to ports that aren’t open, causing very long timeouts.  By performing all connections asynchronously this prevents the application from being unresponsive.</li>
</ul>
<h1>Try it out Today</h1>
<p>If you&#8217;d like to check out Live Sessions for yourself, you&#8217;ll need to <a title="Gibraltar Version History" href="https://www.gibraltarsoftware.com/Support/Version_History.aspx">download the latest build of Gibraltar 3.0</a> and upgrade to the included Agent, Analyst and Hub.  The Hub Server does the central relaying between agents and analysts so it has to be set up in the center.  Live Sessions are not available with the subscription Hub Service operated by us at this time, you have to have your own private Gibraltar Hub.</p>
<img src="http://feeds.feedburner.com/~r/RockSolid/~4/0KwZBQQKB1A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://rocksolid.gibraltarsoftware.com/development/logging/gibraltar-3-0-new-feature-dive-live-sessions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://rocksolid.gibraltarsoftware.com/development/logging/gibraltar-3-0-new-feature-dive-live-sessions</feedburner:origLink></item>
		<item>
		<title>Getting to Know Gibraltar – Adding Exceptions</title>
		<link>http://feedproxy.google.com/~r/RockSolid/~3/6K9foOMgY1E/getting-to-know-gibraltar-adding-exceptions</link>
		<comments>http://rocksolid.gibraltarsoftware.com/development/logging/getting-to-know-gibraltar-adding-exceptions#comments</comments>
		<pubDate>Wed, 07 Dec 2011 21:55:59 +0000</pubDate>
		<dc:creator>Gary</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Gibraltar]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[Product Information]]></category>
		<category><![CDATA[Exceptions]]></category>

		<guid isPermaLink="false">http://rocksolid.gibraltarsoftware.com/?p=1101</guid>
		<description><![CDATA[Continuing with our Getting to Know Gibraltar series - see how you can record and handle exceptions in an easy, step-by-step way.]]></description>
			<content:encoded><![CDATA[<p><a href="http://rocksolid.gibraltarsoftware.com/?p=1051">In my last post</a> we set up a minimalist application, attached Gibraltar to it, and reported some trace information. In this post we’re going to build on that and add exceptions. First we are going to add an unhandled exception, so we change our code so that it looks like this:</p>
<pre class="brush: csharp; title: ; notranslate">
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace GibraltarGettingStartedApp
{

	class Program
	{
		static int Main(string[] args)
			{
				Trace.WriteLine(&quot;About to Blow up...&quot;);
				int zero = 0;
				Trace.Close();
				return 1 / zero;
			}
		}
	}
}
</pre>
<p>That should get the runtime’s panties in a bunch, let’s try it. <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/wlEmoticon-smile1.png" alt="Smile" /></p>
<p><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/SNAGHTML22a2b5ec.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SNAGHTML22a2b5ec" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/SNAGHTML22a2b5ec_thumb.png" alt="SNAGHTML22a2b5ec" width="577" height="157" border="0" /></a></p>
<p>Yep, that did it! Now, let’s see what Gibraltar logged…</p>
<p><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image7.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image_thumb3.png" alt="image" width="435" height="52" border="0" /></a></p>
<p>Gibraltar knows we crashed and if we open up the record…</p>
<p><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image8.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image_thumb4.png" alt="image" width="566" height="106" border="0" /></a></p>
<p>We know what the problem was, we can click the link and go right to the line in the source code and Gibraltar tells us what the user experience is going to be, “This fatal error will not be reported to the user, then the application will exit”. All and all, pretty cool.</p>
<p>As an aside, let me close down VS, I want to test if I click the link, will it open the file and go to the line? It does! That’s cool, though I notice that it only opens the actual file and not the solution or project that the file is in. Hmm, I’ll need to investigate that more as it’d be better if the entire solution was opened, don’t you think?</p>
<p>Let’s try running the same unhandled exception in a winforms application and see what happens. We’ll need to run the exe from the commandline, as the VS debugger will “get in the way” and try to do “clever stuff”, but when we do, we see the following dialog:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SNAGHTML298b97c" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/SNAGHTML298b97c.png" alt="SNAGHTML298b97c" width="472" height="301" border="0" /></p>
<p>Here Gibraltar is giving us even more help. It’s popped up a dialog which will actually help us recover from the crash and carry on using our application. If we select “Restart Application” Gibraltar will restart the application for us and enable us to carry on using our application. Of course, this facility should only be used in a testing environment. In the real world, I don’t think it would be wise to restart and to continue using an application which had just suffered from a crash, as there is no way to know what state the underlying model is in. However, from a testing perspective, it’s an excellent tool.</p>
<p>Of course, the same information is recorded in Gibraltar:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image9.png" alt="image" width="475" height="48" border="0" /></p>
<p>Notice that the “Status” has been recorded as “Normal”. If we open the record we can see why:</p>
<p><a href="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image10.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image_thumb5.png" alt="image" width="442" height="146" border="0" /></a></p>
<p>It’s because we chose to continue the execution and shut down the application normally after.</p>
<p>Okay, let’s change our console application code to handle the exception…</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace GibraltarGettingStartedApp
{
	class Program
	{
		static int Main(string[] args)
		{
			Trace.WriteLine(&quot;About to Blow up...&quot;);
			int zero = 0;
			Trace.Close();
			try { return 1 / zero; }
			catch (DivideByZeroException e) { }
			return 0;
		}
	}
}
</pre>
<p>And let’s see what difference that made to Gibraltar…</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image11.png" alt="image" width="507" height="70" border="0" /></p>
<p>Hmm, as far as Gibraltar is concerned everything is normal, there is no sign of the handled exception. For a clue as to why that is, let’s examine logging best practices, you can read them at…</p>
<p><a title="http://www.gibraltarsoftware.com/Support/Documentation/Logging_BestPractices.html" href="http://www.gibraltarsoftware.com/Support/Documentation/Logging_BestPractices.html">http://www.gibraltarsoftware.com/Support/Documentation/Logging_BestPractices.html</a></p>
<p>And they quite clearly state:</p>
<blockquote><p>“We strongly recommend that in all cases where an exception is consumed within a catch block that you log the exception with an Informational severity rather than silently swallowing the error.”</p></blockquote>
<p>Okay, so this states that if we handle an exception, and we want that fact recorded by Gibraltar, then we have to log it. That makes sense really. So, let’s change our code to the following:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace GibraltarGettingStartedApp
{
	class Program
	{
		static int Main(string[] args)
		{
			Trace.WriteLine(&quot;About to Blow up...&quot;);
			int zero = 0;
			try { return 1 / zero; }
			catch (DivideByZeroException e)
			{
				Trace.WriteLine(&quot;Error: &quot; + e.Message);
			}
			Trace.Close();
			return 0;
		}
	}
}
</pre>
<p>Now let’s see how that’s affected Gibraltar:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image12.png" alt="image" width="499" height="90" border="0" /></p>
<p>This time you can plainly see that the error has been recorded, which is good, but notice too that there’s no exception tab:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image13.png" alt="image" width="236" height="113" border="0" /></p>
<p>Of course, we should be able to do better and we can. If we use the TraceInformation method, and pass a formatted string, along with the exception, then Gibraltar will give us a much richer experience.</p>
<p>So, let’s change our code to use that method:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;

namespace GibraltarGettingStartedApp
{
	class Program
	{
		static int Main(string[] args)
		{
			Trace.WriteLine(&quot;About to Blow up...&quot;);
			int zero = 0;
			try { return 1 / zero; }
			catch (DivideByZeroException e)
			{
				Trace.TraceInformation(&quot;Error: {0}&quot;,e.Message,e);
			}
			Trace.Close();
			return 0;
		}
	}
}
</pre>
<p>And let’s look at the information provided in Gibraltar:</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/image14.png" alt="image" width="332" height="112" border="0" /></p>
<p>This time, as you can see, we get the “Exceptions” tab. This is because Gibraltar scans the insertion variables and, if it finds one that is an exception, then it uses that as the exception for the log message (regardless of its severity). Pretty cool eh?</p>
<p>In this post we added an unhandled exception to your console application to see what effect that had on Gibraltar. We then added an unhandled exception to a winforms application so we could see the enhanced features available to us there and then we finished up by handling that exception and seeing why best practice is to log handled exceptions.</p>
<p>I hope you’ll join me next time as we continue our exploration of Gibraltar, until then, happy coding! <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://rocksolid.gibraltarsoftware.com/wp-content/uploads/wlEmoticon-smile1.png" alt="Smile" /></p>
<img src="http://feeds.feedburner.com/~r/RockSolid/~4/6K9foOMgY1E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://rocksolid.gibraltarsoftware.com/development/logging/getting-to-know-gibraltar-adding-exceptions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://rocksolid.gibraltarsoftware.com/development/logging/getting-to-know-gibraltar-adding-exceptions</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.943 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-01-30 10:55:16 --><!-- Compression = gzip -->

