Skip to content
Browse files

add gelf logging

  • Loading branch information...
1 parent b0c9bbf commit 180481aea527acbde2055a468664a035036ccc91 @garethr garethr committed
Showing with 11 additions and 1 deletion.
  1. +2 −1 Gemfile
  2. +6 −0 Gemfile.lock
  3. +3 −0 config/environments/production.rb
View
3 Gemfile
@@ -18,7 +18,8 @@ gem 'stringex'
gem 'loofah'
gem 'nokogiri'
gem 'whenever'
-
+gem 'gelf'
+gem 'graylog2_exceptions'
gem 'plek', '~> 0'
gem 'aws-ses', :require => 'aws/ses'
View
6 Gemfile.lock
@@ -56,6 +56,10 @@ GEM
exception_notification (2.5.2)
actionmailer (>= 3.0.4)
ffi (1.0.11)
+ gelf (1.1.3)
+ json
+ graylog2_exceptions (1.3.0)
+ gelf (= 1.1.3)
guard (0.9.4)
ffi (>= 0.5.0)
thor (~> 0.14.6)
@@ -159,6 +163,8 @@ DEPENDENCIES
aws-ses
ci_reporter
exception_notification
+ gelf
+ graylog2_exceptions
guard
guard-minitest
jquery-rails
View
3 config/environments/production.rb
@@ -1,6 +1,8 @@
Fco::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
+ config.middleware.use "Graylog2Exceptions", { :hostname => 'graylog.cluster', :port => '12201', :facility => 'fco'}
+
# Code is not reloaded between requests
config.cache_classes = true
@@ -35,6 +37,7 @@
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
+ config.logger = GELF::Logger.new("graylog.cluster", "12201", max_size = 'WAN', { :facility => "fco" })
# Use a different cache store in production
# config.cache_store = :mem_cache_store

0 comments on commit 180481a

Please sign in to comment.
Something went wrong with that request. Please try again.