IMPORTANT: elasticsearch.js has been replaced by the new Elasticsearch JavaScript client. We strongly advise you to migrate to the new client. To learn more, see the migration guide.
Using A Library
editUsing A Library
editWhen the client receives a function for the log:
config value, it expects that the function is a constructor for a custom log class. This is the simplest way to integrate other logging libraries into the elasticsearch client at this time. The contract for this Log class is pretty straight-forward. See our implementation for additional details.
new Constructor(config)
edit
|
The object that was passed to the client constructor, use to determine the log level. |
error(error)
edit
|
|
warning(message)
edit
|
|
info(message)
edit
|
|
debug(message)
edit
|
|
trace(httpMethod, requestUrl, requestBody, responseBody, responseStatus)
editCalled after every HTTP request.
|
|
|
|
|
|
|
|