Skip to content

Commit cf49296

Browse files
committed
Only force logging to STDOUT in Heroku production. It's just annoying everywhere else.
1 parent 5120c8b commit cf49296

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

config/application.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class Application < Rails::Application
3030
config.ember.variant = Rails.env.downcase.to_sym
3131
config.assets.js_compressor = :uglifier
3232

33-
config.logger = Logger.new(STDOUT)
34-
config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO')
35-
3633
config.after_initialize do
3734
if %w{development test}.include?(Rails.env)
3835
Hirb.enable
@@ -53,5 +50,3 @@ class Application < Rails::Application
5350
ActionView::Base.field_error_proc = Proc.new { |html_tag, instance|
5451
%(<span class="field_with_errors">#{html_tag}</span>).html_safe
5552
}
56-
57-
#require 'font_assets/railtie' # => loads font middleware so cloudfront can serve fonts that render in Firefox

config/environments/production.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@
1818
config.assets.digest = true
1919
config.static_cache_control = 'public, max-age=31536000'
2020
config.host = ENV['HOST_DOMAIN']
21+
config.logger = Logger.new(STDOUT)
22+
config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO')
2123
end

0 commit comments

Comments
 (0)