instiki/config/environments/production.rb
Jacques Distler f92ed693c0 Log rotation. By default, we now use the standard Ruby Logger class to rotate the Instiki logfile.
This works fine with the default Webrick. But, if you're running under Mongrel (say), you probably
want to customize this in config/environments/production.rb .
2007-03-13 14:54:43 -05:00

33 lines
1.4 KiB
Ruby

# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
####
# This one rotates the log file, keeping 25 files, of 1MB each.
INSTIKI_LOGGER = Logger.new("#{RAILS_ROOT}/log/#{RAILS_ENV}.log", 25, 1024000)
# Unfortunately, the above does not work well under Mongrel, as the default Ruby logger class
# does no locking and you will have several processes running, each wanting to write to (and
# rotate) the log file. One solution is to have each mongrel instance writes to a different log file:
# http://blog.caboo.se/articles/2006/11/14/configure-mongrel-rails-logger-per-port for a solution.
# Another is to use the default logging behaviour:
#INSTIKI_LOGGER = RAILS_DEFAULT_LOGGER
# and use an external program (e.g. logrotate) to rotate the logs.
####
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Disable delivery errors if you bad email addresses should just be ignored
# config.action_mailer.raise_delivery_errors = false