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

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

Open
wellsmuker opened this issue Sep 4, 2021 · 0 comments

Comments

@wellsmuker
Copy link

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?

@stale stale bot added the stale label Jan 9, 2022
@elastic elastic deleted a comment from stale bot Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants