mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Introduce log_dir env variable for truemail and require it with figaro.
Use log_dir in truemail initializer.
This commit is contained in:
parent
481bb34e67
commit
76eed1ef08
3 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,9 @@
|
|||
#
|
||||
# Be sure to restart your server when you modify settings.
|
||||
#
|
||||
# Log directory for gems not using syslog
|
||||
log_dir: /home/app/current/log
|
||||
|
||||
|
||||
#
|
||||
# SMTP configuration (for Admin/EPP/Registrar/Registrant servers)
|
||||
|
|
|
@ -5,4 +5,5 @@ Figaro.require_keys(%w[
|
|||
time_zone
|
||||
action_mailer_default_host
|
||||
action_mailer_default_from
|
||||
log_dir
|
||||
])
|
||||
|
|
|
@ -72,6 +72,6 @@ Truemail.configure do |config|
|
|||
# stdout, write to file or both of these. Tracking event by default is :error
|
||||
# Available tracking event: :all, :unrecognized_error, :recognized_error, :error
|
||||
unless Rails.env.test?
|
||||
config.logger = { tracking_event: :all, stdout: true, log_absolute_path: Rails.root.join('log', 'truemail.log') }
|
||||
config.logger = { tracking_event: :all, stdout: true, log_absolute_path: "#{ENV['log_dir']}/truemail.log" }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue