changeset 27:efc548be0a3a

Fix logging to stdout in production.
author edogawaconan <me@myconan.net>
date Sat, 06 Sep 2014 00:08:18 +0900
parents a4deb8a43cc3
children 03f904c070f7
files config/environments/production.rb
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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