diff --git a/config/environment.rb b/config/environment.rb index 3488440..a925c89 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,8 +1,5 @@ # Load the Rails application. require File.expand_path('../application', __FILE__) -#init a debugger -Rails.logger = Logger.new(STDOUT) - # Initialize the Rails application. -Rails.application.initialize! \ No newline at end of file +Rails.application.initialize! diff --git a/config/environments/production.rb b/config/environments/production.rb index 00b1214..02ea30f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,8 +61,11 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new + # Include working directory name in log for servers running multiple Rails instances. + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = ::Logger::Formatter.new + config.logger = ActiveSupport::TaggedLogging.new(logger) + config.log_tags = [ Rails.root.to_s.split('/').last ] # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false @@ -72,4 +75,4 @@ config.assets.debug = false config.assets.compile = false config.assets.quiet = true -end \ No newline at end of file +end