elastic/elasticsearch-rails

NoMethodError: undefined method `logger' for #<Elasticsearch::Transport::Client:0x00007f9dda026410>

wellsmuker opened this issue · 0 comments

Hi, elasticsearch team,

I got a error message after upgrading version 7.2.0.

# My code
$es_client = Elasticsearch::Client.new
$es_client.transport.logger.level = Logger::INFO
$es_client.transport.logger.formatter = proc { |s, d, p, m| "\e[2m# #{m}\n\e[0m" }


# Error=>
NoMethodError: undefined method `logger' for #<Elasticsearch::Transport::Client:0x00007f9dda026410>

The source code seems to have modified the original codes,
I temporarily use the following method to fix!

 $es_client.transport.transport.logger.level = Logger::INFO
 $es_client.transport.transport.logger.formatter = proc { |s, d, p, m| "\e[2m# #{m}\n\e[0m" }

Will future versions use this method?