Skip to content

Commit 028cad9

Browse files
fix deprecation warning from Rails 7.2, use kwarg for bold option
Why? Fixes 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)`)
1 parent 5605d1f commit 028cad9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-rails/lib/elasticsearch/rails/instrumentation/log_subscriber.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def search(event)
4747
name = "#{payload[:klass]} #{payload[:name]} (#{event.duration.round(1)}ms)"
4848
search = payload[:search].inspect.gsub(/:(\w+)=>/, '\1: ')
4949

50-
debug %Q| #{color(name, GREEN, true)} #{colorize_logging ? "\e[2m#{search}\e[0m" : search}|
50+
debug %Q| #{color(name, GREEN, bold: true)} #{colorize_logging ? "\e[2m#{search}\e[0m" : search}|
5151
end
5252
end
5353

0 commit comments

Comments
 (0)