<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>cwash into software &#187; logging</title>
	<atom:link href="http://cwash.org/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwash.org</link>
	<description>+= construction + craftsmanship;</description>
	<lastBuildDate>Thu, 29 Sep 2011 04:23:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>New Wave Logging</title>
		<link>http://cwash.org/2008/03/19/new-wave-logging/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-wave-logging</link>
		<comments>http://cwash.org/2008/03/19/new-wave-logging/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:34:39 +0000</pubDate>
		<dc:creator>Chris Wash</dc:creator>
				<category><![CDATA[JBoss Seam]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[web beans]]></category>

		<guid isPermaLink="false">http://cwash.org/2008/03/19/new-wave-logging/</guid>
		<description><![CDATA[Tired of messy logging logic cluttering your code with a bunch of if/else statements?  Don't let logging cramp your style! The approach <a href="http://www.seamframework.org" title="JBoss Seam">Seam</a> takes to logging makes your code pretty again (and other things).  What does this mean for you?  No more "<em>code guards</em>"!

A nice byproduct of the genius of Seam's design is that many common problems can be solved by using <em>EL </em>as veritable swiss-army knife.  We'll look at this through a logging example specifically, though it's just one of many different innovative ways of solving problems using Java5 features and <a href="http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#elenhancements">EL</a> as a general approach.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://cwash.org/2008/03/19/new-wave-logging/";</script><script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script><p>Tired of messy logging logic cluttering your code with a bunch of if/else statements?  Don&#8217;t let logging cramp your style! The approach <a href="http://www.seamframework.org" title="JBoss Seam">Seam</a> takes to logging makes your code pretty again (and other things).  What does this mean for you?  No more &#8220;<em>code guards</em>&#8220;!</p>
<p>A nice byproduct of the genius of Seam&#8217;s design is that many common problems can be solved by using <em>EL </em>as veritable swiss-army knife.  We&#8217;ll look at this through a logging example specifically, though it&#8217;s just one of many different innovative ways of solving problems using Java5 features and <a href="http://docs.jboss.com/seam/2.0.1.GA/reference/en/html_single/#elenhancements">EL</a> as a general approach.</p>
<h3>WTF is a code guard?</h3>
<p>What goes without saying in most of the discussions regarding logging is that excessive logging can be the largest and most common performance bottleneck in code that meets its functional requirements.  Thus, logging APIs introduce the idea of log levels, to ease the burden of excessive logging.  Generally, log levels are a configuration setting on a per-environment basis.  Development environments will typically log most dependent code at the <em>info </em>level, and cut that up to the <em>debug</em> level for custom code or when things go awry with a piece of dependent code.  Testing environments typically log at <em>info</em> while production will often just log at the <em>warn</em> level.</p>
<p>While this is all well and good, we find that for a lot of the logging we do, we typically run across an ugly little flaw in this approach that&#8217;s produced an equally ugly hack as a work-around.  Enter the <em>code guard</em>.  From the log4j docs:</p>
<blockquote><p>Code guards are typically used to guard code that only needs to execute in support of logging, that otherwise introduces undesirable runtime overhead in the general case (logging disabled). Examples are multiple parameters, or expressions (e.g. string + &#8221; more&#8221;) for parameters. Use the guard methods of the form log.is&lt;Priority&gt;() to verify that logging should be performed, before incurring the overhead of the logging  method call. Yes, the logging methods will perform the same check, but only after resolving parameters.</p></blockquote>
<p>What&#8217;s all this business about resolving parameters?  Let&#8217;s look at an example:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// unguarded code</span><br />
log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: &quot;</span> <span style="color: #339933;">+</span> foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;, BAR: &quot;</span> <span style="color: #339933;">+</span> foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// guarded code</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>log.<span style="color: #006633;">isDebugEnabled</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: &quot;</span> <span style="color: #339933;">+</span> foo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;, BAR: &quot;</span> <span style="color: #339933;">+</span> foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>So, we need this cluttered if/else around only to ensure that our expressions (concats, usually) won&#8217;t get resolved unless we actually want them to.  Why is there no other recourse?  The answer isn&#8217;t surprising – it comes down to the way the API was designed.  All log4j logging methods take a single argument &#8212; which made a lot of sense, I suppose when the powers that be first designed logging APIs. They soon realized that in order to use their API, one has to use an expression to resolve all parameters into a single argument prior to calling the method!  This is why a code guard is needed.</p>
<p>Java5 introduces a feature that allows for <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html" title="Variable Length Arguments" target="_blank">varargs</a>, and taking advantage of this can help us with our ugly little logging problem, e.g.</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: #0, BAR: #1&quot;</span>, foo, foo.<span style="color: #006633;">getBar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>With this approach, our expressions won&#8217;t get resolved until after we&#8217;re in debug(), and we can let it do the dirty work inside the method.  The first thing that our logging method does is check to see if its level is valid, otherwise it&#8217;ll fall out immediately.  Because the concatenation happens inside the log method, we don&#8217;t need a code guard to protect us.</p>
<p>This is the approach that Seam takes to logging.  Seam&#8217;s <a href="http://docs.jboss.com/seam/latest-2/api/org/jboss/seam/log/Log.html" title="Seam's Log Interface">Log</a> interface provides not only a solution that removes the need for code guards, it also allows you to use EL in your log messages (if you&#8217;re trying to dive into a Seam component&#8230;) &#8211; e.g.</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">log.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;FOO: #{foo}, BAR: #{foo.bar}&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Much better.  By and large, this is the way you do logging in Seam.  Because binding occurs late, you never really run into the problem where you need to even think about using something like a &#8220;code guard.&#8221;  Code what you&#8217;re supposed to; not noise! <strong>This is just one of many novel ways to use EL in Seam</strong>, and why it really deserves a look as a way to write better code, faster and as a far more productive platform for Java programmers (fed up with JavaSE/EE 1.4) than Rails/Grails.</p>
<p>See the <a href="http://in.relation.to/Bloggers/TheWebBeansManifesto" target="_blank" title="Web Beans Manifesto">Web Beans Manifesto</a> for much more on this approach.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://cwash.org/2008/03/19/new-wave-logging/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=24&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=102&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=74&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=6&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=4&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=New+Wave+Logging&amp;link=http://cwash.org/2008/03/19/new-wave-logging/&amp;notes=Tired%20of%20messy%20logging%20logic%20cluttering%20your%20code%20with%20a%20bunch%20of%20if%2Felse%20statements%3F%20%20Don%27t%20let%20logging%20cramp%20your%20style%21%20The%20approach%20Seam%20takes%20to%20logging%20makes%20your%20code%20pretty%20again%20%28and%20other%20things%29.%20%20What%20does%20this%20mean%20for%20you%3F%20%20No%20more%20%22code%20guards%22%21%0D%0A%0D%0AA%20nice%20byproduct%20of%20the%20genius%20of%20Seam%27s%20design%20is%20that%20many%20common%20problems%20can%20be%20solved%20by%20using%20EL%20as%20veritable%20swiss-army%20knife.%20%20We%27ll%20look%20at%20this%20through%20a%20logging%20example%20specifically%2C%20though%20it%27s%20just%20one%20of%20many%20different%20innovative%20ways%20of%20solving%20problems%20using%20Java5%20features%20and%20EL%20as%20a%20general%20approach.&amp;short_link=http://bit.ly/b9tGdk&amp;v=1&amp;apitype=1&amp;apikey=&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div></div>

<h3  class="related_post_title">More Related Content</h3><ul class="related_post"><li>November 28, 2008 -- <a href="http://cwash.org/2008/11/28/must-havesreferences-for-modern-java-ee-developers/" title="Must Haves/References For Modern Java EE Developers">Must Haves/References For Modern Java EE Developers</a> (1)</li><li>April 15, 2009 -- <a href="http://cwash.org/2009/04/15/osgi-ggity-giggity/" title="OSGi-ggity-Giggity">OSGi-ggity-Giggity</a> (4)</li><li>June 3, 2009 -- <a href="http://cwash.org/2009/06/03/what-is-hamcrest/" title="What is Hamcrest?">What is Hamcrest?</a> (0)</li><li>January 31, 2009 -- <a href="http://cwash.org/2009/01/31/in-response-to-stackoverflow-38quality-doesnt-matter-that-much-jeff-and-joel/" title="In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel ">In response to Stackoverflow #38/&#8221;Quality Doesn&#8217;t Matter That Much&#8221; &#8212; Jeff and Joel </a> (3)</li><li>January 21, 2009 -- <a href="http://cwash.org/2009/01/21/16-apps-that-lessen-teh-suck-of-web-development-in-xp/" title="16 Apps That Lessen TEH SUCK of Web Development in XP">16 Apps That Lessen TEH SUCK of Web Development in XP</a> (8)</li><li>January 13, 2009 -- <a href="http://cwash.org/2009/01/13/on-software-quality/" title="On Software Quality">On Software Quality</a> (8)</li><li>December 1, 2008 -- <a href="http://cwash.org/2008/12/01/24ways/" title="24ways">24ways</a> (1)</li><li>November 19, 2008 -- <a href="http://cwash.org/2008/11/19/java-6-and-maven-209-on-leopard/" title="Java 6 and Maven 2.0.9 on Leopard">Java 6 and Maven 2.0.9 on Leopard</a> (7)</li><li>September 10, 2008 -- <a href="http://cwash.org/2008/09/10/axis2-client-using-adb-runtime-dependencies/" title="Axis2 client using ADB &#8211; runtime dependencies">Axis2 client using ADB &#8211; runtime dependencies</a> (6)</li><li>August 21, 2008 -- <a href="http://cwash.org/2008/08/21/weblogic-92-seam-victory-is-mine/" title="Weblogic 9.2 + Seam : Victory is Mine!">Weblogic 9.2 + Seam : Victory is Mine!</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://cwash.org/2008/03/19/new-wave-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

