From 9eda064d431936eefd47e031d5d6737505f126ca Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 13 Aug 2015 16:31:34 +0300 Subject: [PATCH] Added syslog #2292 --- config/environments/alpha.rb | 5 ++++- config/environments/production.rb | 4 ++-- config/environments/staging.rb | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/environments/alpha.rb b/config/environments/alpha.rb index 01ae5d81d..ac4902599 100644 --- a/config/environments/alpha.rb +++ b/config/environments/alpha.rb @@ -46,7 +46,10 @@ Rails.application.configure do config.log_level = :info # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] + config.log_tags = [:subdomain, :uuid, :remote_ip] + + # Use a different logger for distributed setups. + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) diff --git a/config/environments/production.rb b/config/environments/production.rb index 01ae5d81d..df42c5581 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -46,10 +46,10 @@ Rails.application.configure do config.log_level = :info # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] + config.log_tags = [:subdomain, :uuid, :remote_ip] # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. # config.cache_store = :mem_cache_store diff --git a/config/environments/staging.rb b/config/environments/staging.rb index ee1303a1c..f0997dab5 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -46,10 +46,13 @@ Rails.application.configure do config.log_level = :info # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] + config.log_tags = [:subdomain, :uuid, :remote_ip] # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different logger for distributed setups. + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. # config.cache_store = :mem_cache_store