We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Just noticed a small issue on Python 3.4 when using the tracing logger. It seems to break a little bit due to str vs. bytes issues.
elasticsearch.trace: INFO: curl -XGET 'http://localhost:9200/myindex/mydoc/_search?pretty&size=100&from=0' -d 'b'{"query": {"match_all": {}}}''
The following diff shows how I hacked it in on my box to have nice tracing, but I am not sure if that's the proper way to address it.
diff --git a/elasticsearch/connection/base.py b/elasticsearch/connection/base.py index 16c0b97..3240e71 100644 --- a/elasticsearch/connection/base.py +++ b/elasticsearch/connection/base.py @@ -56,7 +56,7 @@ class Connection(object): path = path.replace('?', '?pretty&', 1) if '?' in path else path + '?pretty' if self.url_prefix: path = path.replace(self.url_prefix, '', 1) - tracer.info("curl -X%s 'http://localhost:9200%s' -d '%s'", method, path, _pretty_json(body) if body else '') + tracer.info("curl -X%s 'http://localhost:9200%s' -d '%s'", method, path, _pretty_json(body.decode()) if body else '') if tracer.isEnabledFor(logging.DEBUG): tracer.debug('#[%s] (%.3fs)\n#%s', status_code, duration, _pretty_json(response).replace('\n', '\n#') if response else '') @@ -81,5 +81,3 @@ class Connection(object): pass raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
The text was updated successfully, but these errors were encountered:
Thanks for the catch, fixed in f10d7f2
Sorry, something went wrong.
No branches or pull requests
Just noticed a small issue on Python 3.4 when using the tracing logger. It seems to break a little bit due to str vs. bytes issues.
The following diff shows how I hacked it in on my box to have nice tracing, but I am not sure if that's the proper way to address it.
The text was updated successfully, but these errors were encountered: