From a0fecf1c2ecb8f51c926ba5a9eb56725d201ea32 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Thu, 13 Aug 2015 16:38:46 +0300 Subject: [PATCH] Syslog updates #2292 --- Gemfile | 1 + Gemfile.lock | 5 +++++ config/environments/alpha.rb | 2 +- config/environments/production.rb | 2 +- config/environments/staging.rb | 5 +---- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 7dd391c42..6e43bdb2f 100644 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,7 @@ source 'https://rubygems.org' gem 'rails', '4.2.3' # when update, all initializers eis_custom files needs check/update gem 'iso8601', '~> 0.8.6' # for dates and times gem 'hashie-forbidden_attributes', '~> 0.1.1' +gem 'SyslogLogger', '~> 2.0.0' # load env gem 'figaro', '~> 1.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index dd0bcf2f0..bcda0a7ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,6 +36,7 @@ GIT GEM remote: https://rubygems.org/ specs: + SyslogLogger (2.0) abstract_type (0.0.7) actionmailer (4.2.3) actionpack (= 4.2.3) @@ -539,6 +540,7 @@ PLATFORMS ruby DEPENDENCIES + SyslogLogger (~> 2.0.0) activerecord-import (~> 0.7.0) autodoc better_errors (~> 2.1.1) @@ -620,3 +622,6 @@ DEPENDENCIES uuidtools (~> 2.1.4) validates_email_format_of (~> 1.6.3) whenever (~> 0.9.4) + +BUNDLED WITH + 1.10.6 diff --git a/config/environments/alpha.rb b/config/environments/alpha.rb index 96994cbed..0659b8e4c 100644 --- a/config/environments/alpha.rb +++ b/config/environments/alpha.rb @@ -49,7 +49,7 @@ Rails.application.configure do config.log_tags = [:subdomain, :uuid, :remote_ip] # Use a different logger for distributed setups. - config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new(ENV['app_name']) + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new(ENV['app_name'])) # 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 df42c5581..ef1ba2e0a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -49,7 +49,7 @@ Rails.application.configure do 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(ENV['app_name'])) # 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 f0997dab5..a18e9a4c0 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -49,10 +49,7 @@ Rails.application.configure do 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) + config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new(ENV['app_name'])) # Use a different cache store in production. # config.cache_store = :mem_cache_store