summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-09-19 12:14:12 +0200
committerAzul <azul@leap.se>2013-09-19 12:14:12 +0200
commit073dc636ffa2da07ee7a719c6166a3ca1b593fb3 (patch)
tree8fa3c106ef08f072ec5bb2c8f7ab0b442dc62724
parent22e6f781caec701a4d041e0ac183df4c955e89c2 (diff)
default to syslog in production - #3886
-rw-r--r--config/application.rb2
-rw-r--r--config/environments/production.rb11
2 files changed, 7 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..73e98e5 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -33,11 +33,12 @@ 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?
+ # Prepend all log lines with the following tags
+ config.log_tags = [ :leap, :webapp ]
+ config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+ end
# Use a different cache store in production
# config.cache_store = :mem_cache_store