# HG changeset patch # User edogawaconan # Date 1409929698 -32400 # Node ID efc548be0a3a71b380e75053a522fd3d79899b26 # Parent a4deb8a43cc382d6ec507802ad86bb7b937e338e Fix logging to stdout in production. diff -r a4deb8a43cc3 -r efc548be0a3a config/environments/production.rb --- a/config/environments/production.rb Fri Sep 05 23:51:16 2014 +0900 +++ b/config/environments/production.rb Sat Sep 06 00:08:18 2014 +0900 @@ -29,8 +29,15 @@ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + # Set to :debug to see everything in the log. - config.log_level = :info + config.log_level = :warn + config.logger = ::Logger.new(STDOUT) + + # Recommended by http://help.papertrailapp.com/kb/configuration/unicorn + config.logger.level = Logger.const_get("WARN") # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] @@ -57,7 +64,4 @@ # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new end