Skip to content

Commit dc2d20f

Browse files
committed
fix: handle nil logger in ActiveJob::Logging
1 parent f3aea8c commit dc2d20f

File tree

1 file changed

+5
-1
lines changed
  • lib/rails_semantic_logger/extensions/active_job

1 file changed

+5
-1
lines changed

lib/rails_semantic_logger/extensions/active_job/logging.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ module Logging
99

1010
undef_method :tag_logger
1111
def tag_logger(*tags, &block)
12-
logger.tagged(*tags, &block)
12+
if logger.respond_to?(:tagged)
13+
logger.tagged(*tags, &block)
14+
else
15+
yield
16+
end
1317
end
1418
end
1519
end

0 commit comments

Comments
 (0)