Skip to content

Commit

Permalink
Email logging updates
Browse files Browse the repository at this point in the history
  • Loading branch information
russellporter committed Nov 20, 2024
1 parent 472a124 commit 6f3ab98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.core.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ WJR_SMTP_USER_NAME=
WJR_SMTP_PASSWORD=
WJR_DATA_FOLDER=/tmp/whyjustrun-data/
WJR_DATA_URL=file:///tmp/whyjustrun-data/
WJR_LOG_EMAILS=
9 changes: 5 additions & 4 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@
end

Rails.application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[WhyJustRun Core] ",
:sender_address => %{"WhyJustRun Core" <[email protected]>},
:exception_recipients => %w{[email protected]}
ignore_if: ->(env, exception) { exception.message =~ /invalid byte sequence in UTF-8/ },
email: {
email_prefix: "[WhyJustRun Core] ",
sender_address: %{"WhyJustRun Core" <[email protected]>},
exception_recipients: ENV.fetch("WJR_LOG_EMAILS", "").split(",").reject(&:empty?)
}

0 comments on commit 6f3ab98

Please sign in to comment.