Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
add gelf logging
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Jan 5, 2012
1 parent b0c9bbf commit 180481a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -159,6 +163,8 @@ DEPENDENCIES
aws-ses
ci_reporter
exception_notification
gelf
graylog2_exceptions
guard
guard-minitest
jquery-rails
Expand Down
3 changes: 3 additions & 0 deletions 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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 180481a

Please sign in to comment.