<?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/"
	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>Glog &#187; python</title>
	<atom:link href="http://blog.aiama.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aiama.com</link>
	<description></description>
	<lastBuildDate>Sat, 03 Dec 2011 06:25:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.aiama.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Glog &#187; python</title>
		<link>http://blog.aiama.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.aiama.com/osd.xml" title="Glog" />
	<atom:link rel='hub' href='http://blog.aiama.com/?pushpress=hub'/>
		<item>
		<title>Love thy Logging</title>
		<link>http://blog.aiama.com/2008/05/31/love-thy-logging/</link>
		<comments>http://blog.aiama.com/2008/05/31/love-thy-logging/#comments</comments>
		<pubDate>Sat, 31 May 2008 19:42:58 +0000</pubDate>
		<dc:creator>gerirgaudi</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://gerirgaudi.wordpress.com/2008/05/31/love-thy-logging/</guid>
		<description><![CDATA[Fact: I&#8217;m not a developer. That&#8217;s magic I leave to people far (far) more talented than myself. Fact: I do write code relatively often. It is not a constant activity for a variety of reasons: the weather, fires at work, my camera, Saturday nights out and about, whatever. The net result of this stop-and-go is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.aiama.com&amp;blog=3418512&amp;post=7&amp;subd=gerirgaudi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Fact: I&#8217;m not a developer. That&#8217;s magic I leave to <a title="Martin's Weblog" href="http://split-s.blogspot.com/">people</a> far (<strong>far</strong>) more talented than myself. Fact: I do write code relatively often. It is not a constant activity for a variety of reasons: the weather, fires at work, my camera, Saturday nights out and about, whatever. The net result of this stop-and-go is that I don&#8217;t always keep up with new language features, and Python&#8217;s <span style="font-family:'Courier New';"><a title="Logging facility for Python" href="http://docs.python.org/lib/module-logging.html">logging module</a></span> is a good example of this sometimes embarrassing reality. This module has been available in the standard Python distribution since version 2.3, but it was only recently that I started using it. It rocks.</p>
<p>Ninety percent of the code I write is sysadmin related code. Task automation, log grokking and processing, monitoring widgets, reporting tools, management gizmos and the like. A lot of these are long-running processes that deal with a fair number of interconnected (and possibly remote) moving parts. Given a 24&#215;7 shop, these tools have to interact with the real world, which implies strapping them to monitoring systems, the kind that will page the humans in those (hopefully) rare instances when things do go sideways and someone has to intervene to make it all better. The pace is relentless, so streamlining the development is critical to keep up and be able to maintain the code as things evolve.</p>
<p>Before discovering the <span style="font-family:'Courier New';">logging</span> module, I wrote a fair amount code involving admittedly crude custom loggers and heavy usage of the <a title="Unix syslog library routined" href="http://docs.python.org/lib/module-syslog.html"><span style="font-family:'Courier New';">syslog</span> module</a>, which is fine, actually, but far from optimal. The logging module does away with all of that, simplifying the code and allowing for a fair amount of control over how and where messages are sent. In addition to log files and syslog, the logging module offers a good variety of other handlers (SMTP, socket and datagram, to name a few). Yum. It forces a bit of thinking about the organization of messages (mapping conditions to severity levels and deciding what to do for each severity), but this is actually quite helpful. Yum yum.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gerirgaudi.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gerirgaudi.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gerirgaudi.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gerirgaudi.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gerirgaudi.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.aiama.com&amp;blog=3418512&amp;post=7&amp;subd=gerirgaudi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.aiama.com/2008/05/31/love-thy-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b079627c377fe7a5555fb68068724ed?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gerirgaudi</media:title>
		</media:content>
	</item>
	</channel>
</rss>
