Elasticsearch-py: Confusion at tracelog

Created on 16 Mar 2016  路  2Comments  路  Source: elastic/elasticsearch-py

Hi all;

During a debug trace, a tracer.info message fooled me for a while and caused me to loose some time before figuring out what the problem actually was. It made me think that I was making the requests to localhost instead of the remote host;

In connection/base.py:73

tracer.info("curl -X%s 'http://localhost:9200%s' -d '%s'", method, path, _pretty_json(body) if body else '')

"localhost:9200" needs to be replaced with %s -> self.host I believe,

Shall I create a PR for this?

https://github.com/sinanislekdemir/elasticsearch-py/commit/6624fc42bc542a85c3faeca73984180bba33c019

All 2 comments

This is by design so that you can share the trace log. the regular log (elasticsearch logger) has the proper host/port.

Thanks for the report.

From #327:
Suggestion: [Allow] Use 'elasticsearch' fixed hostname, so people interested on using it can tinker with local DNS resolution or allow to customize the base url (http://localhost:9200) part via command line switch or config option.
Would that be acceptable? (just leaving open to possible PRs)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jrobison-sb picture jrobison-sb  路  5Comments

jaraco picture jaraco  路  3Comments

alanbacon picture alanbacon  路  3Comments

kuzhao picture kuzhao  路  6Comments

jaisharma639 picture jaisharma639  路  6Comments