Skip to content

Commit 8252801

Browse files
ramonsnirindexzero
authored andcommitted
added logstash support to console transport
1 parent a251aa9 commit 8252801

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/winston/transports/console.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var Console = exports.Console = function (options) {
2727
this.prettyPrint = options.prettyPrint || false;
2828
this.timestamp = typeof options.timestamp !== 'undefined' ? options.timestamp : false;
2929
this.label = options.label || null;
30+
this.logstash = options.logstash || false;
3031

3132
if (this.json) {
3233
this.stringify = options.stringify || function (obj) {
@@ -71,7 +72,8 @@ Console.prototype.log = function (level, msg, meta, callback) {
7172
timestamp: this.timestamp,
7273
prettyPrint: this.prettyPrint,
7374
raw: this.raw,
74-
label: this.label
75+
label: this.label,
76+
logstash: this.logstash
7577
});
7678

7779
if (level === 'error' || level === 'debug') {

0 commit comments

Comments
 (0)