Improved logging for used backeds.

This commit is contained in:
Martin Edenhofer 2018-02-15 12:25:47 +01:00
parent 7dbc69549d
commit 47c079d5d7

View file

@ -529,12 +529,12 @@ returns
Setting.where(area: 'Postmaster::PreFilter').order(:name).each do |setting| Setting.where(area: 'Postmaster::PreFilter').order(:name).each do |setting|
filters[setting.name] = Kernel.const_get(Setting.get(setting.name)) filters[setting.name] = Kernel.const_get(Setting.get(setting.name))
end end
filters.each_value do |backend| filters.each do |key, backend|
Rails.logger.debug "run postmaster pre filter #{backend}" Rails.logger.debug "run postmaster pre filter #{key}: #{backend}"
begin begin
backend.run(channel, mail) backend.run(channel, mail)
rescue => e rescue => e
Rails.logger.error "can't run postmaster pre filter #{backend}" Rails.logger.error "can't run postmaster pre filter #{key}: #{backend}"
Rails.logger.error e.inspect Rails.logger.error e.inspect
raise e raise e
end end