fix: modify exception tracker to log even if sentry configured (#7563)

Right now, if sentry is configured exception won't be logged. This results in the log management tool missing every error captured with ChatwootExceptionTracker. This change logs the exception, even if Sentry is configured or not.

Fixes https://linear.app/chatwoot/issue/CW-2145/improve-logging-info-debug-trace
This commit is contained in:
Vishnu Narayanan 2023-07-21 14:28:49 +05:30 committed by GitHub
parent 4828071fc3
commit d188600559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,12 +12,9 @@ class ChatwootExceptionTracker
end
def capture_exception
if ENV['SENTRY_DSN'].present?
capture_exception_with_sentry
else
capture_exception_with_sentry if ENV['SENTRY_DSN'].present?
Rails.logger.error @exception
end
end
private