<?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>Sat, 28 Jan 2012 23:16:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: shyiconoclast</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-5036</link>
		<dc:creator>shyiconoclast</dc:creator>
		<pubDate>Fri, 20 Jan 2012 23:58:43 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-5036</guid>
		<description>It helped me. Just what I was looking for at a WTF moment. 

Thank you so much for posting it. I don&#039;t know how long it would have taken me to find it otherwise.

Thanks for being a great member of the Rails community. It&#039;s people like you that make it thrive. (Why is it that when I&#039;m really thanking someone it starts sounding ironic? Well, it&#039;s not.)</description>
		<content:encoded><![CDATA[<p>It helped me. Just what I was looking for at a WTF moment. </p>
<p>Thank you so much for posting it. I don&#8217;t know how long it would have taken me to find it otherwise.</p>
<p>Thanks for being a great member of the Rails community. It&#8217;s people like you that make it thrive. (Why is it that when I&#8217;m really thanking someone it starts sounding ironic? Well, it&#8217;s not.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Evgeny</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-5023</link>
		<dc:creator>Evgeny</dc:creator>
		<pubDate>Tue, 03 Jan 2012 12:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-5023</guid>
		<description>Thank you</description>
		<content:encoded><![CDATA[<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tass</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4987</link>
		<dc:creator>Tass</dc:creator>
		<pubDate>Thu, 15 Dec 2011 19:37:38 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4987</guid>
		<description>Thank you, Jason!

This was driving me nuts. It seemed like such a simple thing, too. Little did I know that it WAS a simple thing once I found your blog. ;-)

Again, thanks and cheers!</description>
		<content:encoded><![CDATA[<p>Thank you, Jason!</p>
<p>This was driving me nuts. It seemed like such a simple thing, too. Little did I know that it WAS a simple thing once I found your blog. ;-)</p>
<p>Again, thanks and cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory Logan</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4959</link>
		<dc:creator>Cory Logan</dc:creator>
		<pubDate>Thu, 08 Dec 2011 23:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4959</guid>
		<description>Thanks a ton! That&#039;s super helpful. It seems like the logger is something that should just be inherited by everything, but appending &quot;Rails.&quot; is no big deal I suppose.</description>
		<content:encoded><![CDATA[<p>Thanks a ton! That&#8217;s super helpful. It seems like the logger is something that should just be inherited by everything, but appending &#8220;Rails.&#8221; is no big deal I suppose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nirav</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4791</link>
		<dc:creator>nirav</dc:creator>
		<pubDate>Wed, 20 Jul 2011 14:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4791</guid>
		<description>help me too! thanks!</description>
		<content:encoded><![CDATA[<p>help me too! thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4776</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Fri, 15 Jul 2011 13:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4776</guid>
		<description>It helped me! Thanks!</description>
		<content:encoded><![CDATA[<p>It helped me! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: particleman</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4443</link>
		<dc:creator>particleman</dc:creator>
		<pubDate>Sat, 26 Feb 2011 07:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4443</guid>
		<description>That helped me understand my problem, thank you!</description>
		<content:encoded><![CDATA[<p>That helped me understand my problem, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-4431</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 08 Feb 2011 21:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-4431</guid>
		<description>Just came across this tip from a rails logger from model....was trying to debug info in the cancan Ability model.
Thanks</description>
		<content:encoded><![CDATA[<p>Just came across this tip from a rails logger from model&#8230;.was trying to debug info in the cancan Ability model.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Phelps</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-1720</link>
		<dc:creator>Jamie Phelps</dc:creator>
		<pubDate>Tue, 28 Dec 2010 17:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-1720</guid>
		<description>Thanks for posting this, Jason. Helped a bunch!</description>
		<content:encoded><![CDATA[<p>Thanks for posting this, Jason. Helped a bunch!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-1399</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Thu, 23 Dec 2010 23:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-1399</guid>
		<description>yay! it worked for me!</description>
		<content:encoded><![CDATA[<p>yay! it worked for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-544</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Sun, 19 Sep 2010 00:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-544</guid>
		<description>That helped me. Thank you!</description>
		<content:encoded><![CDATA[<p>That helped me. Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: idonas</title>
		<link>http://jasonseifer.com/2009/08/10/using-the-rails-logger-outside-of-models-and-controllers/comment-page-1#comment-541</link>
		<dc:creator>idonas</dc:creator>
		<pubDate>Thu, 16 Sep 2010 07:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://jasonseifer.com/?p=210#comment-541</guid>
		<description>sure does! thanx.</description>
		<content:encoded><![CDATA[<p>sure does! thanx.</p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>

