Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #142 from krzkaczor/krzkaczor/winston-fixes
Browse files Browse the repository at this point in the history
Krzkaczor/winston fixes
  • Loading branch information
StephenHynes7 authored Nov 15, 2016
2 parents dbcac48 + 2afdd39 commit 3359e94
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ class Logger extends Writable {
constructor(opts) {
super(opts);
this.json = opts.json;
this.name = 'logentries';

const transportOpts = _.clone(opts || {});

Expand Down Expand Up @@ -738,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)) {
Expand All @@ -752,10 +753,6 @@ class Logger extends Writable {
setImmediate(cb.bind(null, null, true));
}

get name() {
return 'logentries';
}

get tempLevel() {
return this._tempLevel;
}
Expand Down

0 comments on commit 3359e94

Please sign in to comment.