Change logger-formatter confirm to zigbee-shepherd debug

This commit is contained in:
tb-killa
2018-08-13 19:21:55 +02:00
committed by Koenkk
parent 43260a3a83
commit 8411c0b30d
+3 -4
View File
@@ -27,10 +27,9 @@ const logger = new (winston.Logger)({
new (winston.transports.Console)({
timestamp: () => new Date().toLocaleString(),
formatter: function(options) {
return options.timestamp() + ' ' +
winston.config.colorize(options.level, options.level.toUpperCase()) + ' ' +
(options.message ? options.message : '') +
(options.meta && Object.keys(options.meta).length ? '\n\t'+ JSON.stringify(options.meta) : '' );
return winston.config.colorize(options.level, ' zigbee2mqtt:' + options.level.toLowerCase()) + ' ' +
options.timestamp() + ' --> ' + (options.message ? options.message : '') +
(options.meta && Object.keys(options.meta).length ? '\n\t'+ JSON.stringify(options.meta) : '' );
},
}),
],