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:
@@ -62,7 +62,7 @@ class Instagram::SendOnInstagramService < Base::SendOnChannelService
|
||||
query: query
|
||||
)
|
||||
|
||||
Rails.logger.info("Instagram response: #{response['error']} : #{message_content}") if response['error']
|
||||
Rails.logger.error("Instagram response: #{response['error']} : #{message_content}") if response['error']
|
||||
message.update!(source_id: response['message_id']) if response['message_id'].present?
|
||||
|
||||
response
|
||||
|
||||
@@ -66,7 +66,7 @@ class Notification::PushNotificationService
|
||||
rescue Webpush::ExpiredSubscription
|
||||
subscription.destroy!
|
||||
rescue Errno::ECONNRESET, Net::OpenTimeout, Net::ReadTimeout => e
|
||||
Rails.logger.info "Webpush operation error: #{e.message}"
|
||||
Rails.logger.error "Webpush operation error: #{e.message}"
|
||||
end
|
||||
|
||||
def send_fcm_push(subscription)
|
||||
|
||||
@@ -5,14 +5,14 @@ class Twilio::WebhookSetupService
|
||||
|
||||
def perform
|
||||
if phone_numbers.empty?
|
||||
Rails.logger.info "TWILIO_PHONE_NUMBER_NOT_FOUND: #{channel.phone_number}"
|
||||
Rails.logger.warn "TWILIO_PHONE_NUMBER_NOT_FOUND: #{channel.phone_number}"
|
||||
else
|
||||
twilio_client
|
||||
.incoming_phone_numbers(phonenumber_sid)
|
||||
.update(sms_method: 'POST', sms_url: twilio_callback_index_url)
|
||||
end
|
||||
rescue Twilio::REST::TwilioError => e
|
||||
Rails.logger.info "TWILIO_FAILURE: #{e.message}"
|
||||
Rails.logger.error "TWILIO_FAILURE: #{e.message}"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -58,7 +58,7 @@ class Twitter::SendOnTwitterService < Base::SendOnChannelService
|
||||
tweet_data = response.body
|
||||
message.update!(source_id: tweet_data['id_str'])
|
||||
else
|
||||
Rails.logger.info "TWITTER_TWEET_REPLY_ERROR #{response.body}"
|
||||
Rails.logger.error "TWITTER_TWEET_REPLY_ERROR #{response.body}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user