Add Winston config option to prevent stray 'undefined' in output#1130
Add Winston config option to prevent stray 'undefined' in output#1130MatrixFrog wants to merge 1 commit intoforeversd:masterfrom
Conversation
|
Thanks @MatrixFrog, this does remove the undefined from the output, but unfortunately doesn't solve the incompatibility with forever-service because Winston v3 also colorizes output by default (so the sed command to find the service status still fails). Changing the format from I guess to fix this properly, you'd have to check if the forever cli arguments |
|
FWIW, this addition solves the problem. I don't like it because of the need to require winston within diff --git a/lib/forever/cli.js b/lib/forever/cli.js
index d63163a..7d6a506 100644
--- a/lib/forever/cli.js
+++ b/lib/forever/cli.js
@@ -16,6 +16,7 @@ var fs = require('fs'),
prettyjson = require('prettyjson'),
clone = require('clone'),
objectAssign = require('object-assign'),
+ winston = require("winston"),
forever = require('../forever');
var cli = exports;
@@ -627,6 +628,7 @@ cli.start = function () {
//
if ((typeof app.argv.colors !== 'undefined' && !app.argv.colors) || app.argv.plain) {
colors.mode = 'none';
+ forever.log.format = winston.format.simple();
}
if (app.config.get('help')) { |
|
feel free to update this PR with whatever changes you would like |
issue reported here: #1128 (comment)