Commit 96efc4d7d9007ce4ac77ed41b47cd055c979cecc
Exists in
master
Merge pull request #1014 from rightscale/add_syslog_functionality
Add syslog functionality
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
config/environment.rb
... | ... | @@ -6,6 +6,9 @@ require Rails.root.join('config/load') |
6 | 6 | |
7 | 7 | if Errbit::Config.log_location == 'STDOUT' |
8 | 8 | Rails.logger = ActiveSupport::Logger.new STDOUT |
9 | +elsif Errbit::Config.log_location == 'Syslog::Logger' | |
10 | + require 'syslog/logger' | |
11 | + Rails.logger = Syslog::Logger.new('errbit', Syslog::LOG_LOCAL0) | |
9 | 12 | else |
10 | 13 | Rails.logger = ActiveSupport::Logger.new Errbit::Config.log_location |
11 | 14 | end | ... | ... |
docs/configuration.md
... | ... | @@ -103,4 +103,7 @@ In order of precedence Errbit uses: |
103 | 103 | <dt>USE_UNICORN_WORKER_KILLER</dt> |
104 | 104 | <dd>unicorn-worker-killer modules to enable</dd> |
105 | 105 | <dd>defaults to false</dd> |
106 | +<dt>ERRBIT_LOG_LOCATION</dt> | |
107 | +<dd>Path to use to store the log. Specify <em>STDOUT</em> for stdout output, <em>Syslog::Logger</em> to send logs to syslog (uses local0 facility). | |
108 | +<dd>defaults to STDOUT | |
106 | 109 | </dl> | ... | ... |