lib/semantic_logger/base.rb in semantic_logger-4.8.2 vs lib/semantic_logger/base.rb in semantic_logger-4.9.0

- old
+ new

@@ -186,10 +186,11 @@ # to: # `logger.tagged('first', 'more', 'other')` # - For better performance with clean tags, see `SemanticLogger.tagged`. def tagged(*tags, &block) # Allow named tags to be passed into the logger - if tags.size == 1 + # Rails::Rack::Logger passes logs as an array with a single argument + if tags.size == 1 && !tags.first.is_a?(Array) tag = tags[0] return yield if tag.nil? || tag == "" return tag.is_a?(Hash) ? SemanticLogger.named_tagged(tag, &block) : SemanticLogger.fast_tag(tag.to_s, &block) end