Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bolding log text with positional boolean to be deprecated in Rails 7.2 #108

Closed
connorgurney-personal opened this issue Apr 12, 2023 · 2 comments

Comments

@connorgurney-personal
Copy link

connorgurney-personal commented Apr 12, 2023

When I run rails test in an app running the edge version of Rails, I receive the following warning:

DEPRECATION WARNING: Bolding log text with a positional boolean is deprecated and will be removed in Rails 7.2. Use an option hash instead (eg. color("my text", :red, bold: true)). (called from formatted_in at /usr/local/lib/ruby/gems/3.2.0/gems/kredis-1.3.0.1/lib/kredis/log_subscriber.rb:18)

This stems from the use of the color function in log_subscriber.rb:

color " Kredis #{type} (#{event.duration.round(1)}ms) #{event.payload[:message]}", color, bold: true

I appreciate that this won't be an issue for most people yet but it feels better to report it now and get ahead of the curve.

@connorgurney-personal connorgurney-personal changed the title Color function to be deprecated in Rails 7.2 Bolding log text with positional boolean to be deprecated in Rails 7.2 Apr 12, 2023
@dmcge
Copy link
Contributor

dmcge commented Apr 12, 2023

This is fixed in #98. It just hasn’t been released yet.

@connorgurney-personal
Copy link
Author

Crikey — not sure how I missed that! Sorry.

That said, thanks for the PR. Fingers crossed that it gets released soon.

Do we know of any way to suppress the warning in the meantime?

@dhh dhh closed this as completed Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants