<?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"
	>
<channel>
	<title>Comments on: Rotating Rails Log Files</title>
	<atom:link href="http://www.nullislove.com/2007/09/10/rotating-rails-log-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/</link>
	<description>Code for Coders</description>
	<pubDate>Thu, 28 Aug 2008 13:46:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Martin</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-1214</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 18 Jul 2008 14:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-1214</guid>
		<description>Thanks for the excellent article! I've tried (following different advice from various sources) using the method suggested by Matt, but I can't get it to work. I will definitely try this method. I feel that in most cases that the job of rotating logs is probably not the job of the application or web server. It's probably debatable as to where this kind of functionality should sit (as is the question of any domain-specific functionality), but it probably comes down to each individual case.</description>
		<content:encoded><![CDATA[<p>Thanks for the excellent article! I&#8217;ve tried (following different advice from various sources) using the method suggested by Matt, but I can&#8217;t get it to work. I will definitely try this method. I feel that in most cases that the job of rotating logs is probably not the job of the application or web server. It&#8217;s probably debatable as to where this kind of functionality should sit (as is the question of any domain-specific functionality), but it probably comes down to each individual case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simply Internet Trash &#187; rotate those rails logs</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-1062</link>
		<dc:creator>Simply Internet Trash &#187; rotate those rails logs</dc:creator>
		<pubDate>Wed, 12 Mar 2008 15:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-1062</guid>
		<description>[...] established a standard deployment location of /usr/local/sites/sitename for our apps. Following this advice I think I&#8217;ll use standard logrotate to move the logs around. I&#8217;ve read that log [...]</description>
		<content:encoded><![CDATA[<p>[...] established a standard deployment location of /usr/local/sites/sitename for our apps. Following this advice I think I&#8217;ll use standard logrotate to move the logs around. I&#8217;ve read that log [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Tarbit</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-912</link>
		<dc:creator>Matt Tarbit</dc:creator>
		<pubDate>Thu, 24 Jan 2008 21:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-912</guid>
		<description>You can actually do log rotation from within rails by adding the following line to the Rails::Initializer.run block in your app's /config/environment.rb:

config.logger = Logger.new(config.log_path, 50, 1024**2)

The 2nd argument being the number of .log files you'd like to keep, and the 3rd being the size in bytes that the files are allowed to reach before they'll be rotated. So this line would keep up to a maximum of 50 1MB files. Not quite as configurable as logrotate perhaps (it doesn't support compression for example), but it's nice to be able to keep all of the config within the app.

See here for more:
http://blog.caboo.se/articles/2005/12/15/who-said-size-is-not-important</description>
		<content:encoded><![CDATA[<p>You can actually do log rotation from within rails by adding the following line to the Rails::Initializer.run block in your app&#8217;s /config/environment.rb:</p>
<p>config.logger = Logger.new(config.log_path, 50, 1024**2)</p>
<p>The 2nd argument being the number of .log files you&#8217;d like to keep, and the 3rd being the size in bytes that the files are allowed to reach before they&#8217;ll be rotated. So this line would keep up to a maximum of 50 1MB files. Not quite as configurable as logrotate perhaps (it doesn&#8217;t support compression for example), but it&#8217;s nice to be able to keep all of the config within the app.</p>
<p>See here for more:<br />
<a href="http://blog.caboo.se/articles/2005/12/15/who-said-size-is-not-important" rel="nofollow">http://blog.caboo.se/articles/2005/12/15/who-said-size-is-not-important</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Lotinsky</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-778</link>
		<dc:creator>Ian Lotinsky</dc:creator>
		<pubDate>Thu, 29 Nov 2007 20:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-778</guid>
		<description>Kevin --

Thanks. I did some more research and discovered that the daily/weekly/monthly option is to specify criteria for backup. So if you have it set to daily and, for some reason, the cron job runs twice, the log(s) will not be rotated.

Of course you can override this behavior with the -f (--force) option.

Thanks for the post!</description>
		<content:encoded><![CDATA[<p>Kevin &#8211;</p>
<p>Thanks. I did some more research and discovered that the daily/weekly/monthly option is to specify criteria for backup. So if you have it set to daily and, for some reason, the cron job runs twice, the log(s) will not be rotated.</p>
<p>Of course you can override this behavior with the -f (&#8211;force) option.</p>
<p>Thanks for the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Skoglund</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-766</link>
		<dc:creator>Kevin Skoglund</dc:creator>
		<pubDate>Mon, 26 Nov 2007 17:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-766</guid>
		<description>@Ian: It runs as a cron job, so it will run at whatever time your daily, weekly or monthly cron jobs run.  AFAIK, you can't give it a more specific time.</description>
		<content:encoded><![CDATA[<p>@Ian: It runs as a cron job, so it will run at whatever time your daily, weekly or monthly cron jobs run.  AFAIK, you can&#8217;t give it a more specific time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Lotinsky</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-763</link>
		<dc:creator>Ian Lotinsky</dc:creator>
		<pubDate>Sat, 24 Nov 2007 18:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-763</guid>
		<description>Thanks for the great post! Question: is there any way to specify what time you want the rotation to run? If not, is there a standard time it backs up at? Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for the great post! Question: is there any way to specify what time you want the rotation to run? If not, is there a standard time it backs up at? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-758</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Thu, 22 Nov 2007 14:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.nullislove.com/2007/09/10/rotating-rails-log-files/#comment-758</guid>
		<description>Kevin,

Thanks much for this excellent article. I particularly appreciate the detailed explanations for each configuration statement that goes in logrotate.conf.

The advantage of copytruncate over create is clear as crystal now.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Thanks much for this excellent article. I particularly appreciate the detailed explanations for each configuration statement that goes in logrotate.conf.</p>
<p>The advantage of copytruncate over create is clear as crystal now.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
