<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Pro Tips: Color Your Tail With Perl</title>
	<atom:link href="http://twoguysarguing.wordpress.com/2011/03/22/pro-tips-color-your-tail-with-perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://twoguysarguing.wordpress.com/2011/03/22/pro-tips-color-your-tail-with-perl/</link>
	<description>colorful back and forth from two highly opinionated programmers</description>
	<lastBuildDate>Fri, 17 May 2013 10:05:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: benjaminplee</title>
		<link>http://twoguysarguing.wordpress.com/2011/03/22/pro-tips-color-your-tail-with-perl/#comment-598</link>
		<dc:creator><![CDATA[benjaminplee]]></dc:creator>
		<pubDate>Wed, 23 Mar 2011 14:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://twoguysarguing.wordpress.com/?p=1303#comment-598</guid>
		<description><![CDATA[Very nice, thanks.  Mine was a complete quick and dirty hack.  Thanks for the improvement.]]></description>
		<content:encoded><![CDATA[<p>Very nice, thanks.  Mine was a complete quick and dirty hack.  Thanks for the improvement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Miller</title>
		<link>http://twoguysarguing.wordpress.com/2011/03/22/pro-tips-color-your-tail-with-perl/#comment-597</link>
		<dc:creator><![CDATA[Ray Miller]]></dc:creator>
		<pubDate>Tue, 22 Mar 2011 22:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://twoguysarguing.wordpress.com/?p=1303#comment-597</guid>
		<description><![CDATA[That&#039;s not the most efficient way to do things: you are invoking perl three times in the pipeline, and needlessly considering SEVERE lines as maybe ERROR or WARN. A small improvement would be to invoke perl only once and use the &#039;&#124;&#124;&#039; operator to short-circuit. As the &#039;-p&#039; is processing a line at a time, you probably don&#039;t need the &#039;g&#039; regex modifier. This works for me:

tail -100f $1 &#124; perl -ple &#039;s/^.*SEVERE.*$/\e[1;37;45m$&amp;\e[0m/ &#124;&#124; s/^.*ERROR.*$/\e[1;37;41m$&amp;\e[0m/ &#124;&#124; s/^.*WARN.*$/\e[1;33;40m$&amp;\e[0m/&#039;

Of course there are tools out there to do this sort of thing, for example colortail  and ccze .]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s not the most efficient way to do things: you are invoking perl three times in the pipeline, and needlessly considering SEVERE lines as maybe ERROR or WARN. A small improvement would be to invoke perl only once and use the &#8216;||&#8217; operator to short-circuit. As the &#8216;-p&#8217; is processing a line at a time, you probably don&#8217;t need the &#8216;g&#8217; regex modifier. This works for me:</p>
<p>tail -100f $1 | perl -ple &#8216;s/^.*SEVERE.*$/\e[1;37;45m$&amp;\e[0m/ || s/^.*ERROR.*$/\e[1;37;41m$&amp;\e[0m/ || s/^.*WARN.*$/\e[1;33;40m$&amp;\e[0m/&#8217;</p>
<p>Of course there are tools out there to do this sort of thing, for example colortail  and ccze .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pro Tips: Color Your Tail With Perl</title>
		<link>http://twoguysarguing.wordpress.com/2011/03/22/pro-tips-color-your-tail-with-perl/#comment-596</link>
		<dc:creator><![CDATA[Pro Tips: Color Your Tail With Perl]]></dc:creator>
		<pubDate>Tue, 22 Mar 2011 17:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://twoguysarguing.wordpress.com/?p=1303#comment-596</guid>
		<description><![CDATA[[...] 2011-03-22 11:40:40,884 INFO [STDOUT] (main) 11:40:40,884 WARN [ProcessRoles] Could NOT find... [full post]    benjaminplee     Two Guys Arguing   javalinuxbashlogs            0        0        0        0    [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 2011-03-22 11:40:40,884 INFO [STDOUT] (main) 11:40:40,884 WARN [ProcessRoles] Could NOT find&#8230; [full post]    benjaminplee     Two Guys Arguing   javalinuxbashlogs            0        0        0        0    [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
