Elasticsearch-net: Ability to display the query that is being executed in a log message / output window..

Created on 11 Aug 2014  Â·  4Comments  Â·  Source: elastic/elasticsearch-net

It's difficult to track down what specific query is being run and you can't call ToString() or look at the output window / log to see what query is being executed by the client.. This would really help us nubs :).

Most helpful comment

Ok, I saw this now (link) but it's not exactly convenient, especially since I do use ThrowExceptions(). Seems like there could be a more convenient way.

All 4 comments

Hi @niemyjski you can call .EnableTrace() on ConnectionSettings and NEST will write every request and response on the TRACE output.

ConnectionStatus also has a ConnectionStatusHandler(Func) callback that you can hook your logging into. I will open a new ticket to update our documentation with better examples on how to hook NLog Serilog Log4Net into NEST.

We are working on supporting fancy glimpse and miniprofiler output as well.

Awesome thanks!

Thanks
-Blake Niemyjski

On Mon, Aug 11, 2014 at 2:53 PM, Martijn Laarman [email protected]
wrote:

Hi @niemyjski https://github.com/niemyjski you can call .EnableTrace()
on ConnectionSettings and NEST will write every request and response on
the TRACE output.

ConnectionStatus also has a ConnectionStatusHandler(Func) callback that
you can hook your logging into. I will open a new ticket to update our
documentation with better examples on how to hook NLog Serilog Log4Net
into NEST.

We are working on supporting fancy glimpse and miniprofiler output as well.

—
Reply to this email directly or view it on GitHub
https://github.com/elasticsearch/elasticsearch-net/issues/864#issuecomment-51831433
.

Was the EnableTrace method removed? If so, what should we use in its place?

Ok, I saw this now (link) but it's not exactly convenient, especially since I do use ThrowExceptions(). Seems like there could be a more convenient way.

Was this page helpful?
0 / 5 - 0 ratings