Search This Blog

Friday, March 6, 2015

Redmine Log rotation

Just upgrade to Redmine 3.0.0
Finds of that the Log rotation and level did not work anymore.

I tried both old and new way:
/var/www/redmine-3.0.0/config/additional_environment.rb

The old config:

config.logger = Logger.new(config.log_path, 7, 1024000)
config.logger.level = Logger::WARN


The new config:

config.log_level = :warn


I have to use logrotate at the end:

Here is my config file:
/etc/logrotate.d/redmine


/var/www/redmine-3.0.0/log/production.log {
su www-data www-data
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}


To test run:


logrotate --force /etc/logrotate.d/redmine

No comments:

Post a Comment