From fc702f18c1a5288b5c65517a4f9f8ce491560113 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 1 Sep 2018 22:05:37 +0300 Subject: [PATCH] fix(json-logs): use stringify option This forces the JSON output to be on a single line. Without it, it's not easy to parse the logs. Connects https://github.com/pelias/logger/pull/47 See https://github.com/winstonjs/winston/blob/2.4.0/docs/transports.md#console-transport --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 3772739..cad6748 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,7 @@ function CreateLogger( name, loggerOpts ){ new winston.transports.Console( { colorize: pkgConfig.colorize, json: pkgConfig.json, + stringify: true, timestamp: pkgConfig.timestamp, level: pkgConfig.level, label: name