feat: fix logging levels (#4314)
https://ruby-doc.org/stdlib-2.7.0/libdoc/logger/rdoc/Logger.html Fixes https://github.com/chatwoot/chatwoot/issues/4313
This commit is contained in:
@@ -39,7 +39,7 @@ class ChatwootHub
|
||||
response = RestClient.post(PING_URL, info.to_json, { content_type: :json, accept: :json })
|
||||
version = JSON.parse(response)['version']
|
||||
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
||||
Rails.logger.info "Exception: #{e.message}"
|
||||
Rails.logger.error "Exception: #{e.message}"
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
end
|
||||
@@ -50,7 +50,7 @@ class ChatwootHub
|
||||
info = { company_name: company_name, owner_name: owner_name, owner_email: owner_email, subscribed_to_mailers: true }
|
||||
RestClient.post(REGISTRATION_URL, info.merge(instance_config).to_json, { content_type: :json, accept: :json })
|
||||
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
||||
Rails.logger.info "Exception: #{e.message}"
|
||||
Rails.logger.error "Exception: #{e.message}"
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
end
|
||||
@@ -59,7 +59,7 @@ class ChatwootHub
|
||||
info = { fcm_token_list: fcm_token_list, fcm_options: fcm_options }
|
||||
RestClient.post(PUSH_NOTIFICATION_URL, info.merge(instance_config).to_json, { content_type: :json, accept: :json })
|
||||
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
||||
Rails.logger.info "Exception: #{e.message}"
|
||||
Rails.logger.error "Exception: #{e.message}"
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
end
|
||||
@@ -70,7 +70,7 @@ class ChatwootHub
|
||||
info = { event_name: event_name, event_data: event_data }
|
||||
RestClient.post(EVENTS_URL, info.merge(instance_config).to_json, { content_type: :json, accept: :json })
|
||||
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
||||
Rails.logger.info "Exception: #{e.message}"
|
||||
Rails.logger.error "Exception: #{e.message}"
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService
|
||||
post_message if message_content.present?
|
||||
upload_file if message.attachments.any?
|
||||
rescue Slack::Web::Api::Errors::AccountInactive => e
|
||||
Rails.logger.info e
|
||||
Rails.logger.error e
|
||||
hook.authorization_error!
|
||||
hook.disable if hook.enabled?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user