Permalink
Browse files

[api] Accept `.stringify` option in File transport. Fixes #119. Fixes #…

  • Loading branch information...
1 parent d6cc51c commit 3824637e1909d8ea171cf1f498ba79cd0998f64c @indexzero indexzero committed Jul 8, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/winston/transports/file.js
@@ -63,6 +63,10 @@ var File = exports.File = function (options) {
this.maxFiles = options.maxFiles || null;
this.prettyPrint = options.prettyPrint || false;
this.timestamp = options.timestamp != null ? options.timestamp : true;
+
+ if (this.json) {
+ this.stringify = options.stringify;
+ }
//
// Internal state variables representing the number
@@ -107,7 +111,8 @@ File.prototype.log = function (level, msg, meta, callback) {
json: this.json,
colorize: this.colorize,
prettyPrint: this.prettyPrint,
- timestamp: this.timestamp
+ timestamp: this.timestamp,
+ stringify: this.stringify
}) + '\n';
this._size += output.length;

0 comments on commit 3824637

Please sign in to comment.