diff --git a/docs/logging.asciidoc b/docs/logging.asciidoc index e865fe862..6afb3327e 100644 --- a/docs/logging.asciidoc +++ b/docs/logging.asciidoc @@ -154,6 +154,16 @@ Options: `path`::: `String` -- Location of the file to write log messages to. It is created if it does not exists. Default is `"elasticsearch.log"` +`"tracer"`:: +Logs in a format that can be executed with bash, where everything is commented except the trace commands which are formatted as curl calls. By default all of the urls are rewritten to protect production systems and to making the scripts easier to reuse/send to other people. In order to control the urls written specify the curlHost and curlPort configs. ++ +Options: + +`curlHost`::: +`Sting` -- Default is `"localhost"`. +`curlPort`::: +`Sting` -- Default is `9200`. + `"stream"`:: Send log messages to a WriteableStream + diff --git a/src/lib/loggers/tracer.js b/src/lib/loggers/tracer.js index bedaf2807..1c25a6469 100755 --- a/src/lib/loggers/tracer.js +++ b/src/lib/loggers/tracer.js @@ -39,7 +39,7 @@ Tracer.prototype._formatTraceMessage = function (req) { var originalHost = url.format(_.pick(reqUrl, 'protocol', 'hostname', 'port')); reqUrl.port = this.curlPort; - reqUrl.host = this.curlHost; + reqUrl.hostname = this.curlHost; reqUrl.query = _.defaults(reqUrl.query || {}, { pretty: true }); /* jshint quotmark: double */