Skip to content

Commit

Permalink
handling more edge cases of loggers not responding to silence (#1049)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleks Lokhmutov <43987794+alokhmutov@users.noreply.github.com>
  • Loading branch information
bensheldon and alokhmutov committed Aug 24, 2023
1 parent e11a80a commit a0a22fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/good_job/base_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def self.migrated?
def self.with_logger_silenced(&block)
# Assign to a local variable, just in case it's modified in another thread concurrently
logger = self.logger
if logger
if logger.respond_to? :silence
logger.silence(&block)
else
yield
Expand Down

0 comments on commit a0a22fd

Please sign in to comment.