Skip to content

Commit

Permalink
Prevent message from meta input being overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
lennym authored and indexzero committed Jan 6, 2015
1 parent 270be86 commit 178e8a6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/winston/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,11 @@ exports.log = function (options) {

output = exports.clone(meta) || {};
output.level = options.level;
output.message = options.message;
if (options.label) {
output.label = options.label;
}
if (timestamp) {
output.timestamp = timestamp;
}
output.message = output.message || '';

if (options.label) { output.label = options.label; }
if (options.message) { output.message = options.message; }
if (timestamp) { output.timestamp = timestamp; }

if (options.logstash === true) {
// use logstash format
Expand Down

0 comments on commit 178e8a6

Please sign in to comment.