Skip to content

Instantly share code, notes, and snippets.

@phamonyut
Created November 9, 2014 02:22
Show Gist options
  • Save phamonyut/8d55a3f90a9588054239 to your computer and use it in GitHub Desktop.
Save phamonyut/8d55a3f90a9588054239 to your computer and use it in GitHub Desktop.
# config/application.rb
module MyRailsApp
class Application < Rails::Application
# ...
unless Rails.env.test?
log_level = String(ENV['LOG_LEVEL'] || "info").upcase
config.logger = Logger.new(STDOUT)
config.logger.level = Logger.const_get(log_level)
config.log_level = log_level
config.lograge.enabled = true # see lograge section below...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment