Skip to content

Commit

Permalink
Add default metadata when calling log with string level and message (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
txgruppi committed Jul 11, 2020
1 parent 9f673f0 commit 68ea786
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/winston/logger.js
Expand Up @@ -220,7 +220,9 @@ class Logger extends Transform {
return this;
}

this.write({ [LEVEL]: level, level, message: msg });
msg = { [LEVEL]: level, level, message: msg };
this._addDefaultMeta(msg);
this.write(msg);
return this;
}

Expand Down

0 comments on commit 68ea786

Please sign in to comment.