From a93615cf9762be6cd08b50600eab971f197e9445 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 2 Sep 2013 10:12:07 +0200 Subject: add config setting for logfile This is the most simple thing that could possibly work. If you do not specify a :logfile in your environments config Rails will use the default. --- config/application.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/application.rb b/config/application.rb index 354127b..e8bb2f4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -54,6 +54,10 @@ module LeapWeb # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] + if APP_CONFIG[:logfile] + config.logger = Logger.new(APP_CONFIG[:logfile]) + end + # Enable escaping HTML in JSON. config.active_support.escape_html_entities_in_json = true -- cgit v1.2.3 From b142aa6d348fae98eeba73d9f57d22497c204b08 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 2 Sep 2013 10:14:10 +0200 Subject: document the logfile option in the defaults.yml --- config/defaults.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/defaults.yml b/config/defaults.yml index 8b17b77..910fbf8 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -41,3 +41,4 @@ production: admins: [] domain: example.net payment: [] +# logfile: /path/to/your/logs -- cgit v1.2.3