<?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: Using the Rails logger outside of models and controllers</title>
	<atom:link href="http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/feed" rel="self" type="application/rss+xml" />
	<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 12:19:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Neil Hankey</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-515</link>
		<dc:creator>Neil Hankey</dc:creator>
		<pubDate>Mon, 23 Aug 2010 10:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-515</guid>
		<description>Fine! Thank you.</description>
		<content:encoded><![CDATA[<p>Fine! Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zuko_uno</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-496</link>
		<dc:creator>zuko_uno</dc:creator>
		<pubDate>Tue, 27 Jul 2010 08:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-496</guid>
		<description>Thx for help!</description>
		<content:encoded><![CDATA[<p>Thx for help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotermoter</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-487</link>
		<dc:creator>jotermoter</dc:creator>
		<pubDate>Thu, 01 Jul 2010 21:47:21 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-487</guid>
		<description>It helped me.&lt;br&gt;&lt;br&gt;Tx</description>
		<content:encoded><![CDATA[<p>It helped me.</p>
<p>Tx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eno</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-417</link>
		<dc:creator>eno</dc:creator>
		<pubDate>Wed, 18 Nov 2009 15:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-417</guid>
		<description>I think a better solution would be to&lt;br&gt;&lt;br&gt;module WithRailsLogger&lt;br&gt;def logger; Rails.logger; end&lt;br&gt;end&lt;br&gt;&lt;br&gt;and then include that module into the modules/classes you are working with or even directly into Object&lt;br&gt;&lt;br&gt;Object.send :include, WithRailsLogger</description>
		<content:encoded><![CDATA[<p>I think a better solution would be to</p>
<p>module WithRailsLogger<br />def logger; Rails.logger; end<br />end</p>
<p>and then include that module into the modules/classes you are working with or even directly into Object</p>
<p>Object.send :include, WithRailsLogger</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ki</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-418</link>
		<dc:creator>Ki</dc:creator>
		<pubDate>Thu, 15 Oct 2009 16:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-418</guid>
		<description>Thanks, Jason, it really works.</description>
		<content:encoded><![CDATA[<p>Thanks, Jason, it really works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Grant</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-419</link>
		<dc:creator>Adam Grant</dc:creator>
		<pubDate>Fri, 11 Sep 2009 05:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-419</guid>
		<description>You can also use the constant RAILS_DEFAULT_LOGGER to get the same thing.&lt;br&gt;In gems/rails-2.3.2/lib/initializer.rb:&lt;br&gt;=====================&lt;br&gt;module Rails&lt;br&gt;    def logger&lt;br&gt;      if defined?(RAILS_DEFAULT_LOGGER)&lt;br&gt;        RAILS_DEFAULT_LOGGER&lt;br&gt;      else&lt;br&gt;        nil&lt;br&gt;      end&lt;br&gt;    end&lt;br&gt;end&lt;br&gt;=================&lt;br&gt;That way you can easily set the constant (ex: in testing) without having to stub and mock Rails and #logger (in case you don&#039;t have access to them for some reason...).&lt;br&gt;&lt;br&gt;But in any case, very good tip! I always used the constant, glad to know there&#039;s another way.</description>
		<content:encoded><![CDATA[<p>You can also use the constant RAILS_DEFAULT_LOGGER to get the same thing.<br />In gems/rails-2.3.2/lib/initializer.rb:<br />=====================<br />module Rails<br />    def logger<br />      if defined?(RAILS_DEFAULT_LOGGER)<br />        RAILS_DEFAULT_LOGGER<br />      else<br />        nil<br />      end<br />    end<br />end<br />=================<br />That way you can easily set the constant (ex: in testing) without having to stub and mock Rails and #logger (in case you don&#39;t have access to them for some reason&#8230;).</p>
<p>But in any case, very good tip! I always used the constant, glad to know there&#39;s another way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cndevelopment</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-420</link>
		<dc:creator>cndevelopment</dc:creator>
		<pubDate>Wed, 19 Aug 2009 15:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-420</guid>
		<description>Thanks for that Jason, it surely did.</description>
		<content:encoded><![CDATA[<p>Thanks for that Jason, it surely did.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cndevelopment</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-363</link>
		<dc:creator>cndevelopment</dc:creator>
		<pubDate>Wed, 19 Aug 2009 11:59:11 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-363</guid>
		<description>Thanks for that Jason, it surely did.</description>
		<content:encoded><![CDATA[<p>Thanks for that Jason, it surely did.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raghunadh</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-362</link>
		<dc:creator>raghunadh</dc:creator>
		<pubDate>Thu, 13 Aug 2009 17:37:06 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-362</guid>
		<description>Good one!!</description>
		<content:encoded><![CDATA[<p>Good one!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karunakar</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-361</link>
		<dc:creator>karunakar</dc:creator>
		<pubDate>Thu, 13 Aug 2009 17:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-361</guid>
		<description>Nice tip... Thx....&lt;br&gt;&lt;br&gt;Will it work in the rake tasks? I hope it should.....</description>
		<content:encoded><![CDATA[<p>Nice tip&#8230; Thx&#8230;.</p>
<p>Will it work in the rake tasks? I hope it should&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Hawkins</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-360</link>
		<dc:creator>Jason Hawkins</dc:creator>
		<pubDate>Mon, 10 Aug 2009 20:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-360</guid>
		<description>It helped me*. I&#039;d even do a commercial where I give one of those (paid) testimonials about it. &quot;Jason Seifer&#039;s Rails logger did the trick for me!&quot; Something like that. We&#039;d sell millions. &lt;br&gt;&lt;br&gt;*I don&#039;t know what any of this means :(</description>
		<content:encoded><![CDATA[<p>It helped me*. I&#39;d even do a commercial where I give one of those (paid) testimonials about it. &#8220;Jason Seifer&#39;s Rails logger did the trick for me!&#8221; Something like that. We&#39;d sell millions. </p>
<p>*I don&#39;t know what any of this means :(</p>
]]></content:encoded>
	</item>
</channel>
</rss>
