You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,14 @@ var
47
47
es =elasticsearch.createClient(config);
48
48
```
49
49
50
+
You may also supply a logger for each request by passing in an optional second argument to `elasticsearch.createClient(config, requestLogger)`. This will result in every http(s) request being logged via the callback supplied to the `requestLogger` parameter.
51
+
52
+
```Javascript
53
+
var
54
+
elasticsearch =require('elasticsearch'),
55
+
es =elasticsearch.createClient(config, console.log);
56
+
```
57
+
50
58
##### config._index
51
59
52
60
When initializing the library, you may choose to specify an index and/or type to work with at the start to save from having to supply this information in the options for each operation request:
0 commit comments