From 91a2fccf9206bc56a309be326cff3d136c8e25d8 Mon Sep 17 00:00:00 2001 From: Krzysztof Kaczor Date: Sun, 13 Nov 2016 23:16:00 +0100 Subject: [PATCH 1/2] fixed winston support --- src/logger.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/logger.js b/src/logger.js index 32b597e..3cfafea 100644 --- a/src/logger.js +++ b/src/logger.js @@ -697,6 +697,7 @@ class Logger extends Writable { constructor(opts) { super(opts); this.json = opts.json; + this.name = 'logentries'; const transportOpts = _.clone(opts || {}); @@ -752,10 +753,6 @@ class Logger extends Writable { setImmediate(cb.bind(null, null, true)); } - get name() { - return 'logentries'; - } - get tempLevel() { return this._tempLevel; } From 2afdd390f628fabf06641163c52ee74413d39ef8 Mon Sep 17 00:00:00 2001 From: Krzysztof Kaczor Date: Mon, 14 Nov 2016 23:53:53 +0100 Subject: [PATCH 2/2] fixed support for error as metadata --- src/logger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger.js b/src/logger.js index 3cfafea..7cbcf0e 100644 --- a/src/logger.js +++ b/src/logger.js @@ -739,7 +739,7 @@ class Logger extends Writable { this.logger.log(lvl, message); } else { let message = msg; - if (!_.isEmpty(meta)) { + if (!_.isEmpty(meta) || _.isError(meta)) { if (_.isString(message)) { message += ` ${this.logger.serialize(meta)}`; } else if (_.isObject(message)) {