Skip to content

Instantly share code, notes, and snippets.

@lbalceda
Last active January 27, 2017 19:30
Show Gist options
  • Save lbalceda/5681074 to your computer and use it in GitHub Desktop.
Save lbalceda/5681074 to your computer and use it in GitHub Desktop.
rails 3 vs rails 4 unicorn logger configuration settings
# For Production you would probably want to default the Log Level to 'INFO' instead of 'DEBUG'.
# Rails 3
config.logger = Logger.new(STDOUT)
config.logger.level = Logger.const_get(
ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'DEBUG'
)
# Rails 4
config.logger = ActiveSupport::Logger.new(STDOUT)
config.logger.level = ActiveSupport::Logger.const_get(
ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'DEBUG'
)
@dkan
Copy link

dkan commented Jun 17, 2013

Your gist saved the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment