Skip to content

Commit 88ca46d

Browse files
authored
Merge pull request #457 from shrimple-tech/feature/fix-log-subscriber-deprecation-warning
Fix compatibility issues with ActiveSupport::LogSubscriber#color
2 parents 14e84ef + 6212335 commit 88ca46d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/graphiti.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ def self.logger=(val)
8383
end
8484

8585
def self.log(msg, color = :white, bold = false)
86-
colored = ActiveSupport::LogSubscriber.new.send(:color, msg, color, bold)
86+
if ::ActiveSupport.version >= Gem::Version.new("7.1")
87+
colored = ActiveSupport::LogSubscriber.new.send(:color, msg, color, bold: bold)
88+
else
89+
colored = ActiveSupport::LogSubscriber.new.send(:color, msg, color, bold)
90+
end
91+
8792
logger.debug(colored)
8893
end
8994

0 commit comments

Comments
 (0)