Commit 629b78583ac960e243db9c42c694bb2a0db79e18
1 parent
edeb1e0f
Exists in
master
Add syslog functionality
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
config/environment.rb
1 | +require 'syslog/logger' | |
2 | + | |
1 | 3 | # Load the Rails application. |
2 | 4 | require File.expand_path('../application', __FILE__) |
3 | 5 | |
... | ... | @@ -6,6 +8,8 @@ require Rails.root.join('config/load') |
6 | 8 | |
7 | 9 | if Errbit::Config.log_location == 'STDOUT' |
8 | 10 | Rails.logger = ActiveSupport::Logger.new STDOUT |
11 | +elsif Errbit::Config.log_location == 'Syslog::Logger' | |
12 | + Rails.logger = Syslog::Logger.new('errbit', Syslog::LOG_LOCAL0) | |
9 | 13 | else |
10 | 14 | Rails.logger = ActiveSupport::Logger.new Errbit::Config.log_location |
11 | 15 | end | ... | ... |