Skip to content

Commit

Permalink
added logstash support to console transport
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsnir authored and indexzero committed Nov 7, 2014
1 parent a251aa9 commit 8252801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/winston/transports/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var Console = exports.Console = function (options) {
this.prettyPrint = options.prettyPrint || false;
this.timestamp = typeof options.timestamp !== 'undefined' ? options.timestamp : false;
this.label = options.label || null;
this.logstash = options.logstash || false;

if (this.json) {
this.stringify = options.stringify || function (obj) {
Expand Down Expand Up @@ -71,7 +72,8 @@ Console.prototype.log = function (level, msg, meta, callback) {
timestamp: this.timestamp,
prettyPrint: this.prettyPrint,
raw: this.raw,
label: this.label
label: this.label,
logstash: this.logstash
});

if (level === 'error' || level === 'debug') {
Expand Down

1 comment on commit 8252801

@thomas-riccardi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAB indentation mixed with space indentation

Please sign in to comment.