<?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/"
		>
<channel>
	<title>Comments on: Logging is good for frameworks too</title>
	<atom:link href="http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/feed" rel="self" type="application/rss+xml" />
	<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html</link>
	<description>Stuff that catches a Passionate Programmer's Eye</description>
	<lastBuildDate>Tue, 16 Mar 2010 15:30:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vinay Sajip</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-4546</link>
		<dc:creator>Vinay Sajip</dc:creator>
		<pubDate>Sun, 08 Apr 2007 12:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-4546</guid>
		<description>James: It&#039;s a pain to do this when you are using the development version and regularly doing svn updates to get the latest good stuff. For example: I&#039;m doing a migration of legacy data into a Django app, and I get occasional constraint errors from the DB. So I want to log the SQL being executed in order to be able to pin down the problems. With your approach, wouldn&#039;t I have to reinsert edits I made to add logging to the framework every time I did an &quot;svn up&quot;? It&#039;s hardly ideal.</description>
		<content:encoded><![CDATA[<p>James: It&#8217;s a pain to do this when you are using the development version and regularly doing svn updates to get the latest good stuff. For example: I&#8217;m doing a migration of legacy data into a Django app, and I get occasional constraint errors from the DB. So I want to log the SQL being executed in order to be able to pin down the problems. With your approach, wouldn&#8217;t I have to reinsert edits I made to add logging to the framework every time I did an &#8220;svn up&#8221;? It&#8217;s hardly ideal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Bennett</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-4355</link>
		<dc:creator>James Bennett</dc:creator>
		<pubDate>Sun, 01 Apr 2007 01:41:05 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-4355</guid>
		<description>This really feels like something where we wouldn&#039;t be able to please everyone -- no matter how &quot;light&quot; it is, it still involves overhead in terms of code size and maintenance, and all to save someone from having to type &quot;import logging&quot; on their own ;)

Keep in mind that everybody&#039;s going to have different things they want to log -- you might want to log every time a URL is resolved, Alice might want to log every time a model is instantiated, Bob might want to log every time he renders a template, and so on. Supporting that directly in Django would mean either littering the code with direct calls which log according to settings, or littering the code with dispatcher signals which would be picked up by a logging handler. Neither of those is a happy situation -- again, code weight increases, extra runtime overhead is introduced, maintenance gets harder, and it probably wouldn&#039;t cover everything everyone could want without going to extremes.

Meanwhile, if you need to track something, it&#039;s still fairly easy to add logging code directly where you need it, and then take it out again when you don&#039;t need the logging anymore. Everybody wins that way -- Django doesn&#039;t have to grow tons of code to support logging, and people who want to log have the option :)</description>
		<content:encoded><![CDATA[<p>This really feels like something where we wouldn&#8217;t be able to please everyone &#8212; no matter how &#8220;light&#8221; it is, it still involves overhead in terms of code size and maintenance, and all to save someone from having to type &#8220;import logging&#8221; on their own <img src='http://coderseye.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Keep in mind that everybody&#8217;s going to have different things they want to log &#8212; you might want to log every time a URL is resolved, Alice might want to log every time a model is instantiated, Bob might want to log every time he renders a template, and so on. Supporting that directly in Django would mean either littering the code with direct calls which log according to settings, or littering the code with dispatcher signals which would be picked up by a logging handler. Neither of those is a happy situation &#8212; again, code weight increases, extra runtime overhead is introduced, maintenance gets harder, and it probably wouldn&#8217;t cover everything everyone could want without going to extremes.</p>
<p>Meanwhile, if you need to track something, it&#8217;s still fairly easy to add logging code directly where you need it, and then take it out again when you don&#8217;t need the logging anymore. Everybody wins that way &#8212; Django doesn&#8217;t have to grow tons of code to support logging, and people who want to log have the option <img src='http://coderseye.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-7</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Fri, 20 Jan 2006 02:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-7</guid>
		<description>If the Django project would accept the patch (after review, of course), I would be happy to write the logging code I mention.  I could do it &quot;very light&quot;, so that it would cost next-to-no cycles when logging is turned off.  I&#039;m just not going to bother until I know that I won&#039;t be wasting my time with something that&#039;ll be rejected anyway.</description>
		<content:encoded><![CDATA[<p>If the Django project would accept the patch (after review, of course), I would be happy to write the logging code I mention.  I could do it &#8220;very light&#8221;, so that it would cost next-to-no cycles when logging is turned off.  I&#8217;m just not going to bother until I know that I won&#8217;t be wasting my time with something that&#8217;ll be rejected anyway.</p>
 <a href="http://coderseye.com/wp-content/plugins/cubepoints/cp_about.php?u=2&width=500&height=200" title="CubePoints - About" class="thickbox">?</a>]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-6</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Fri, 20 Jan 2006 01:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-6</guid>
		<description>(thanks for the note about the paranoia level, I removed the registration requirement)

I also don&#039;t want Django to have its own logging.  I want it to use Python&#039;s standard logging throughout the code.  That is, it should be doing something like 

log.debug(&quot;Resolved incoming url %s to module %s, sending to that module.&quot; % (url, module))&quot;

inside the base Django framework code itself.  The fact that it does not is a weakness, in my strongly-stated-opinion.</description>
		<content:encoded><![CDATA[<p>(thanks for the note about the paranoia level, I removed the registration requirement)</p>
<p>I also don&#8217;t want Django to have its own logging.  I want it to use Python&#8217;s standard logging throughout the code.  That is, it should be doing something like </p>
<p>log.debug(&#8220;Resolved incoming url %s to module %s, sending to that module.&#8221; % (url, module))&#8221;</p>
<p>inside the base Django framework code itself.  The fact that it does not is a weakness, in my strongly-stated-opinion.</p>
 <a href="http://coderseye.com/wp-content/plugins/cubepoints/cp_about.php?u=1&width=500&height=200" title="CubePoints - About" class="thickbox">?</a>]]></content:encoded>
	</item>
	<item>
		<title>By: import this. &#187; Blog Archive &#187; Django and framework logging</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-5</link>
		<dc:creator>import this. &#187; Blog Archive &#187; Django and framework logging</dc:creator>
		<pubDate>Fri, 20 Jan 2006 01:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-5</guid>
		<description>[...] Quoth Bruce Kroeze: One thing I just donâ€™t understand is why more people, especially framework designers, omit or skip logging. Django appears to, which is incredibly annoying to me. It is a complex framework, which makes all kinds of assumptions and relies on convention to infer a lot of functionality. Thatâ€™s great, but being able to â€œturn upâ€ the log-level and see some discussion about what decisions it is making, based on what criteria it is using would be incredibly valuable to me. Not only to me, I wager, but to everyone who is learning the framework, or who is teasing out a difficult bug. Yet going in and adding framework-level logging is almost impossible, even on an open-source project, since your changes will not be accepted and will quickly become a merge nightmare. [...]</description>
		<content:encoded><![CDATA[<p>[...] Quoth Bruce Kroeze: One thing I just donâ€™t understand is why more people, especially framework designers, omit or skip logging. Django appears to, which is incredibly annoying to me. It is a complex framework, which makes all kinds of assumptions and relies on convention to infer a lot of functionality. Thatâ€™s great, but being able to â€œturn upâ€ the log-level and see some discussion about what decisions it is making, based on what criteria it is using would be incredibly valuable to me. Not only to me, I wager, but to everyone who is learning the framework, or who is teasing out a difficult bug. Yet going in and adding framework-level logging is almost impossible, even on an open-source project, since your changes will not be accepted and will quickly become a merge nightmare. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Kaplan-Moss</title>
		<link>http://coderseye.com/2006/logging-is-good-for-frameworks-too.html/comment-page-1#comment-4</link>
		<dc:creator>Jacob Kaplan-Moss</dc:creator>
		<pubDate>Thu, 19 Jan 2006 19:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://coderseye.com/2006/logging-is-good-for-frameworks-too.html#comment-4</guid>
		<description>The reason that we haven&#039;t included a logging framework in Django is that Python already *has* a logging framework -- and a pretty good one, at that (see http://docs.python.org/lib/module-logging.html).  

It seems dumb to spend out time writing something that&#039;s part of the standard library -- we wouldn&#039;t spend time writing our own XML parser; why write a logging framework?

[BTW, your comment-spam protection on this blog is positively draconian.  It kinda sucks I need to log in AND complete a CAPTCHA (one that&#039;s gotta suck for non-native English speakers to boot) just to respond to you.  You might want to consider lowering WordPress&#039; parinoia meter :)]</description>
		<content:encoded><![CDATA[<p>The reason that we haven&#8217;t included a logging framework in Django is that Python already *has* a logging framework &#8212; and a pretty good one, at that (see <a href="http://docs.python.org/lib/module-logging.html)" rel="nofollow">http://docs.python.org/lib/module-logging.html)</a>.  </p>
<p>It seems dumb to spend out time writing something that&#8217;s part of the standard library &#8212; we wouldn&#8217;t spend time writing our own XML parser; why write a logging framework?</p>
<p>[BTW, your comment-spam protection on this blog is positively draconian.  It kinda sucks I need to log in AND complete a CAPTCHA (one that's gotta suck for non-native English speakers to boot) just to respond to you.  You might want to consider lowering WordPress' parinoia meter <img src='http://coderseye.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ]</p>
 <a href="http://coderseye.com/wp-content/plugins/cubepoints/cp_about.php?u=3&width=500&height=200" title="CubePoints - About" class="thickbox">?</a>]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->