Skip to content

Commit 9518e7e

Browse files
author
Thales Pinheiro
committed
Merge branch 'master' of github.com:simianhacker/bunyan-elasticsearch
2 parents 01262e7 + 2aadf82 commit 9518e7e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function ElasticsearchStream (options) {
2929
this._client = options.client || new elasticsearch.Client(options);
3030
this._type = options.type || 'logs';
3131
var indexPattern = options.indexPattern || '[logstash-]YYYY.MM.DD';
32-
this._index = options.index || generateIndexName.bind(null, indexPattern);
32+
this._index = options.index || generateIndexName.bind(null, indexPattern);
3333
Writable.call(this, options);
3434
}
3535

@@ -42,14 +42,13 @@ ElasticsearchStream.prototype._write = function (entry, encoding, callback) {
4242
var type = this._type;
4343

4444
var d = domain.create();
45-
d.on('error', function (err) {
45+
d.on('error', function (err) {
4646
console.log("Elasticsearch Error", err.stack);
4747
});
4848
d.run(function () {
4949
entry = JSON.parse(entry.toString('utf8'));
50-
var env = process.env.NODE_ENV || 'development';
5150

52-
// Reassign these fields so them match what the default Kibana dashboard
51+
// Reassign these fields so them match what the default Kibana dashboard
5352
// expects to see.
5453
entry['@timestamp'] = entry.time;
5554
entry.level = levels[entry.level];

0 commit comments

Comments
 (0)