<?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>Shaun Smith &#187; trace</title>
	<atom:link href="http://shaun.boyblack.co.za/blog/tag/trace/feed/" rel="self" type="application/rss+xml" />
	<link>http://shaun.boyblack.co.za/blog</link>
	<description>Flex, Ruby, Mongo - London, UK</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Easiest way to filter Eclipse or FlexBuilder console output (trace statements)</title>
		<link>http://shaun.boyblack.co.za/blog/2009/03/22/easiest-way-to-filter-eclipse-or-flexbuilder-console-output-text/</link>
		<comments>http://shaun.boyblack.co.za/blog/2009/03/22/easiest-way-to-filter-eclipse-or-flexbuilder-console-output-text/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 15:35:54 +0000</pubDate>
		<dc:creator>shaun</dc:creator>
				<category><![CDATA[Questions]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flashbuilder]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[flexbuilder]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://shaun.boyblack.co.za/blog/?p=240</guid>
		<description><![CDATA[UPDATE: This looks like a good fit Grep Console I&#8217;m asking this in relation to Flex Builder, but it might apply to Eclipse in general. Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side? Specifically, I&#8217;d like to be able to filter (ignore) lines by patterns. I came across Logback, but it seems like overkill for this scenario. Is there no way to script &#8230; <a href="http://shaun.boyblack.co.za/blog/2009/03/22/easiest-way-to-filter-eclipse-or-flexbuilder-console-output-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong>: This looks like a good fit <a title="Grep Console (Eclipse Plugin)" href="http://marian.musgit.com/projects_grepconsole.php" target="_blank">Grep Console</a></p>
<p>I&#8217;m asking this in relation to Flex Builder, but it might apply to Eclipse in general.</p>
<p>Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side?</p>
<p>Specifically, I&#8217;d like to be able to filter (ignore) lines by patterns.</p>
<p>I came across Logback, but it seems like overkill for this scenario. Is there no way to script something like this Eclipse itself?<span id="more-240"></span></p>
<p>The question has been asked on Stack Overflow here:</p>
<p><a href="http://stackoverflow.com/questions/669369/easiest-way-to-filter-eclipse-console-output-text" target="_blank">http://stackoverflow.com/questions/669369/easiest-way-to-filter-eclipse-console-output-text</a></p>
<p><strong>Background</strong></p>
<p>I&#8217;m sure that custom built logging tools have their place, but I believe that simple trace statements can be very useful &#8211; especially when dealing with Open Source libraries where it would be impossible to agree on a standard logging tool to use.</p>
<p>Logging tools also add overhead. The nice thing about trace statements is that they don&#8217;t get compiled into your Release Build SWF. The only way to achieve this with a logging tool is to use Conditional Compilation &#8211; not very convienient to have to wrap every log call. Even if the logging tool has an &#8220;off&#8221; switch for Release Builds, there will still be overhead when calling the log function (even if it simply returns directly after being called, there is still the overhead of calling the function).</p>
<p>If there was an easy way to filter trace output on the Eclipse side we could ignore statements that we are not currently interested in (those coming from an external library for example) so long as those statements start with a certain pattern.</p>
<p>I&#8217;m building an application with <a title="SmartyPants-IOC Dependency Injection Framework" href="http://code.google.com/p/smartypants-ioc/" target="_blank">SmartyPants-IOC</a> at the moment and it traces a hell-of-a-lot. Luckily, all of it&#8217;s trace statements look something like this:</p>
<p>[DEBUG] The object ([object TermsPanelMediator]) has 4 injection points.</p>
<p>I&#8217;m also using a little framework that I&#8217;m building called RobotLegs which makes trace statements that look like this:</p>
<p>[ROBOTLEGS] MediatorFactory::createMediator &#8211; Mediator created for View Component: PijinFlex3_0.TermsPanel30</p>
<p>And my application might make trace statements that look like this:</p>
<p>[MYAPP] What the hell is going on here?! This isn&#8217;t a real example!</p>
<p>If I could ignore lines that begin with a certain pattern I would be very happy!</p>
<p><strong>The Solution</strong></p>
<p>Stack Overflow pointed me to <a title="Grep Console (Eclipse Plugin)" href="http://marian.musgit.com/projects_grepconsole.php" target="_blank">Grep Console</a> which can highlight patterns in the output console. Very cool.</p>
<p>So, I can highlight my trace statements with expressions like this:</p>
<p>.*(Q[DEBUG]E).*<br />
.*(Q[ROBOTLEGS]E).*<br />
.*(Q[MYAPP]E).*</p>
<p>With different colours assigned to each expression I get something almost as good as removing unwanted traces.</p>
<div id="attachment_251" class="wp-caption alignnone" style="width: 428px"><img class="size-full wp-image-251" title="grepconsole" src="http://shaun.boyblack.co.za/blog/wp-content/uploads/2009/03/grepconsole.png" alt="Grep Console Eclipse Plugin" width="418" height="302" /><p class="wp-caption-text">Grep Console Eclipse Plugin</p></div>
]]></content:encoded>
			<wfw:commentRss>http://shaun.boyblack.co.za/blog/2009/03/22/easiest-way-to-filter-eclipse-or-flexbuilder-console-output-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

