Maintenance: Reduce log output by switching log level of serveral places.

This commit is contained in:
Rolf Schmidt 2021-05-10 14:18:43 +00:00 committed by Thorsten Eckel
parent 8b6a00d73f
commit 1ffcbd9a4d
4 changed files with 5 additions and 6 deletions

View file

@ -9,7 +9,7 @@ class ActiveJobLock < ActiveRecord::Base
end end
def transfer_to(active_job) def transfer_to(active_job)
logger.info "Transferring ActiveJobLock with id '#{id}' from active_job_id '#{active_job_id}' to active_job_id '#{active_job_id}'." logger.debug { "Transferring ActiveJobLock with id '#{id}' from active_job_id '#{active_job_id}' to active_job_id '#{active_job_id}'." }
reset_time_stamp = Time.zone.now reset_time_stamp = Time.zone.now
update!( update!(

View file

@ -354,7 +354,6 @@ example
raise too_large_messages.join("\n") raise too_large_messages.join("\n")
end end
Rails.logger.info 'done'
{ {
result: result, result: result,
fetched: count_fetched, fetched: count_fetched,

View file

@ -147,7 +147,7 @@ returns
raise Exceptions::UnprocessableEntity, "Unable to send mail to user with id #{data[:recipient][:id]} because there is no email available." if data[:recipient][:email].blank? raise Exceptions::UnprocessableEntity, "Unable to send mail to user with id #{data[:recipient][:id]} because there is no email available." if data[:recipient][:email].blank?
sender = Setting.get('notification_sender') sender = Setting.get('notification_sender')
Rails.logger.info "Send notification to: #{data[:recipient][:email]} (from:#{sender}/subject:#{data[:subject]})" Rails.logger.debug { "Send notification to: #{data[:recipient][:email]} (from:#{sender}/subject:#{data[:subject]})" }
content_type = 'text/plain' content_type = 'text/plain'
if data[:content_type] if data[:content_type]

View file

@ -319,7 +319,7 @@ remove whole data from index
return [] if !data return [] if !data
data.map do |item| data.map do |item|
Rails.logger.info "... #{item['_type']} #{item['_id']}" Rails.logger.debug { "... #{item['_type']} #{item['_id']}" }
output = { output = {
id: item['_id'], id: item['_id'],
@ -915,7 +915,7 @@ helper method for making HTTP calls
=end =end
def self.make_request(url, data: {}, method: :get, open_timeout: 8, read_timeout: 180) def self.make_request(url, data: {}, method: :get, open_timeout: 8, read_timeout: 180)
Rails.logger.info "# curl -X #{method} \"#{url}\" " Rails.logger.debug { "# curl -X #{method} \"#{url}\" " }
Rails.logger.debug { "-d '#{data.to_json}'" } if data.present? Rails.logger.debug { "-d '#{data.to_json}'" } if data.present?
options = { options = {
@ -930,7 +930,7 @@ helper method for making HTTP calls
response = UserAgent.send(method, url, data, options) response = UserAgent.send(method, url, data, options)
Rails.logger.info "# #{response.code}" Rails.logger.debug { "# #{response.code}" }
response response
end end