summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-10-10 10:56:09 -0700
committerjessib <jessib@riseup.net>2013-10-10 10:56:09 -0700
commit0acbf6a158f149c1f4273bde0cfca47547e080f8 (patch)
tree7e836d84ef8b879670b54eaaf6a8d3ae53ab7e14 /config
parentb60a75d8cbe25ac47bb037e9e54a7cf4e2ba4e1f (diff)
parentd6491496704b3909a93b5883f049becb408e0e47 (diff)
Merge pull request #96 from azul/release/0.2.4
Release/0.2.4
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/production.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/config/application.rb b/config/application.rb
index e8bb2f4..8587ffc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -54,7 +54,7 @@ module LeapWeb
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
- if APP_CONFIG[:logfile]
+ if APP_CONFIG[:logfile].present?
config.logger = Logger.new(APP_CONFIG[:logfile])
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 32b4558..7acca75 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -33,11 +33,11 @@ LeapWeb::Application.configure do
# See everything in the log (default is :info)
# config.log_level = :debug
- # Prepend all log lines with the following tags
- # config.log_tags = [ :subdomain, :uuid ]
-
- # Use a different logger for distributed setups
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+ # Use syslog if no file has been specified
+ if APP_CONFIG[:logfile].blank?
+ require 'syslog/logger'
+ config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new('webapp'))
+ end
# Use a different cache store in production
# config.cache_store = :mem_cache_store