Skip to content

Instantly share code, notes, and snippets.

@tinomen
Created May 25, 2011 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tinomen/991326 to your computer and use it in GitHub Desktop.
Save tinomen/991326 to your computer and use it in GitHub Desktop.
changing the default rails logger
Rails::Initializer.run do |config|
log = Logger.new(File.dirname(__FILE__) + "/../log/#{RAILS_ENV}.log")
log.formatter = Logger::Formatter.new
log.level = (Services.env == 'production') ? Logger::INFO : Logger::DEBUG
log.datetime_format = "%Y-%m-%d %H:%M:%S "
config.logger = log
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment