https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-08-13T12:18:34ZRedmineRedmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=193432010-08-13T12:18:34ZFelix Schäfer
<ul></ul><p>Mmh, I thought the docs had been updated to reflect that… IIRC the rationale for not including what you propose is that we don't want to impose any rotation scheme on anyone, everyone potentially having different requirements. The other point was that you should already have some kind of logrotate installed and should configure it for that.</p>
<p>I think you could also add a new logger configuration in the <code>config/additional_environment.rb</code> instead of the other file, thus you'd have it local only and wouldn't be affected by updates.</p>
<p>Anyway, could you update the installation guides to make a note where the logs are and that they might grow rapidly depending on usage and should be taken into a logrotate or whatever?</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=193522010-08-13T14:26:38ZT. Hauptman
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Personally I think that defaulting a configuration that is sane, even if it's nerf, is better in the long run. Power admins can always tweak it to match their optimized system. The rest of us want to install as quickly as possible with the least amount of reading and just have it work...</p>
<p>Regardless I've added a note to the installation page. I don't have time to do a patch for additional_environment.rb.example... Would you be able to add that line?</p>
<p>Cheers</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=193532010-08-13T15:05:36ZFelix Schäfer
<ul></ul><p>T. Hauptman wrote:</p>
<blockquote>
<p>Personally I think that defaulting a configuration that is sane, even if it's nerf, is better in the long run. Power admins can always tweak it to match their optimized system. The rest of us want to install as quickly as possible with the least amount of reading and just have it work...</p>
</blockquote>
<p>I believe that's been discussed already, I too was in favor of a default rotation, but the arguments against it won.</p>
<blockquote>
<p>Regardless I've added a note to the installation page. I don't have time to do a patch for additional_environment.rb.example... Would you be able to add that line?</p>
</blockquote>
<p>Very good, thanks a lot. I'll see if the file is one we modify in some way or if it's shipped vanilla from rails, if the later's the case I think we'll keep it from upstream.</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=193542010-08-13T15:06:03ZFelix Schäfer
<ul><li><strong>Category</strong> set to <i>Documentation</i></li><li><strong>Assignee</strong> set to <i>Felix Schäfer</i></li></ul> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=195072010-08-19T01:38:49ZEric Davis
<ul></ul><p>Felix,</p>
<p>If you can get me a working config for <code>additional_configuration.rb</code>, I can document it in there as an example too.</p>
<p>For anyone that needs it, this is the log rotation setup I run in production:</p>
<pre>
/home/websites/projects.littlestreamsoftware.com/shared/log/*.log {
daily
missingok
compress
delaycompress
sharedscripts
postrotate
touch /home/websites/projects.littlestreamsoftware.com/current/tmp/restart.txt
endscript
}
</pre> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=197032010-08-25T13:07:46ZFelix Schäfer
<ul></ul><p>The OP had already edited the wiki-page <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Logger-Configuration">RedmineInstall</a>, my config in <code>additional_environment.rb</code> is:</p>
<pre><code class="ruby syntaxhl"><span class="c1"># Use the log-rotation from logger</span>
<span class="n">config</span><span class="p">.</span><span class="nf">logger</span> <span class="o">=</span> <span class="no">Logger</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">config</span><span class="p">.</span><span class="nf">log_path</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">1048576</span><span class="p">)</span>
<span class="n">config</span><span class="p">.</span><span class="nf">logger</span><span class="p">.</span><span class="nf">level</span> <span class="o">=</span> <span class="no">Logger</span><span class="o">::</span><span class="no">INFO</span></code></pre> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=203372010-09-15T21:47:21ZFelix Schäfer
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>Felix Schäfer</i></del>)</li></ul><p>Eric: This one's lingering in my list, the documentation for <code>config/environments/production.rb</code> would be:</p>
<pre><code class="ruby syntaxhl"><span class="c1"># Rotate logs bigger than 1MB, keeps no more than 7 rotated logs around.</span>
<span class="c1">#config.logger = Logger.new(config.log_path, 7, 1048576)</span></code></pre>
<p>More info about <code>Logger</code> here: <a class="external" href="http://ruby-doc.org/core/classes/Logger.html">http://ruby-doc.org/core/classes/Logger.html</a>.</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=203392010-09-15T22:18:46ZEric Davis
<ul><li><strong>Assignee</strong> set to <i>Eric Davis</i></li></ul> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=204112010-09-17T04:27:39ZEric Davis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Target version</strong> set to <i>1.0.2</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Updated the documentation in <a class="changeset" title="Added some documentation about the Rails Logger. #6135 Contributed by Felix Schäfer" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4096">r4096</a>. Thanks Felix.</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=204922010-09-20T03:51:31ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Merged into 1.0-stable for release in 1.0.2</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=206662010-09-24T11:17:41ZWicola Lation
<ul></ul><p>Felix Schäfer wrote:</p>
<blockquote>
<p>The OP had already edited the wiki-page <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Logger-Configuration">RedmineInstall</a>, my config in <code>additional_environment.rb</code> is:</p>
</blockquote>
<pre>
1 # Use the log-rotation from logger
2 config.logger = Logger.new(config.log_path, 7, 1048576)
3 config.logger.level = Logger::INFO
</pre>
<p>The wiki-page <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineInstall#Logger-Configuration">RedmineInstall</a> has to be updated with the 'config.logger.level' line as well. This is important, because otherwise the log level defaults back to :DEBUG.</p>
<p>See <a class="external" href="http://www.redmine.org/boards/2/topics/11836">http://www.redmine.org/boards/2/topics/11836</a>.</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=206682010-09-24T11:23:34ZFelix Schäfer
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>Eric: The loglevel seems to get cleared when you specifiy a new logger, or the new logger doesn't get passed what is already configured for the default logger. Either way, could you add a corresponding note to the <code>config/environments/production.rb</code>? Thanks.</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=207342010-09-26T16:50:58ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Thanks, I added some documentation about the log level in <a class="changeset" title="Add documentation about setting the log level. #6135" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4182">r4182</a></p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=207612010-09-26T22:21:21ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Merged into 1.0-stable</p> Redmine - Defect #6135: Default logger configuration grows without bound.https://www.redmine.org/issues/6135?journal_id=566742014-06-09T00:04:02ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/5706">Defect #5706</a>: Default config.log_level is too verbose for production</i> added</li></ul>