aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2014-12-12 09:28:44 +0100
committerHarald Eilertsen <haraldei@anduin.net>2014-12-12 09:28:44 +0100
commit9bf4f290adec2ec6d0a1ef164a1b470ca8aa4deb (patch)
tree9ceb9f93cb7e95bda1a5b2c1d1b25bb386bfa39f
parentc79fe69abe37b0454a86ae78b6f333363f95bff2 (diff)
downloadhmnoweb-9bf4f290adec2ec6d0a1ef164a1b470ca8aa4deb.tar.gz
hmnoweb-9bf4f290adec2ec6d0a1ef164a1b470ca8aa4deb.tar.bz2
hmnoweb-9bf4f290adec2ec6d0a1ef164a1b470ca8aa4deb.zip
Log to syslog in production.
-rw-r--r--Gemfile5
-rw-r--r--Gemfile.lock2
-rw-r--r--config/environments/production.rb4
3 files changed, 8 insertions, 3 deletions
diff --git a/Gemfile b/Gemfile
index bb22fc5..9a8d824 100644
--- a/Gemfile
+++ b/Gemfile
@@ -13,8 +13,9 @@ group :development, :test do
end
group :production do
- gem 'activerecord-postgresql-adapter'
- gem 'pg'
+ gem 'activerecord-postgresql-adapter'
+ gem 'pg'
+ gem 'SyslogLogger'
end
group :deployment do
diff --git a/Gemfile.lock b/Gemfile.lock
index bc22203..1f6b15d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -9,6 +9,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
+ SyslogLogger (2.0)
actionmailer (3.2.20)
actionpack (= 3.2.20)
mail (~> 2.5.4)
@@ -367,6 +368,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ SyslogLogger
activerecord-postgresql-adapter
bcrypt-ruby (~> 3.0.0)
capistrano (~> 3.3.4)
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 65c0e3c..e39ab27 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,3 +1,5 @@
+require 'syslog/logger'
+
BetaWebApp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
@@ -37,7 +39,7 @@ BetaWebApp::Application.configure do
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+ config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new('hmno'))
# Use a different cache store in production
# config.cache_store = :mem_cache_store