From 0f79098f4476f45bca429d0c2cd4366e68a76940 Mon Sep 17 00:00:00 2001 From: Evgenii Abramov Date: Sun, 16 May 2021 02:36:56 +0300 Subject: [PATCH] c --- app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 3e7a4f6..46906be 100644 --- a/app.js +++ b/app.js @@ -4,7 +4,7 @@ const fs = require('fs'); const path = require('path'); /* */ const {createLogger, format, transports} = require('winston'); -const {combine, timestamp, label, printf} = format; +const {combine, timestamp, printf} = format; /* express and https */ const ejs = require('ejs'); const express = require('express'); @@ -29,7 +29,7 @@ global.logger = createLogger({ format: combine( label(), timestamp(), - printf(({level, message, timestamp, label}) => { + printf(({level, message, label, timestamp}) => { return `${timestamp} [${label}] ${level}: ${message}`; }) ), @@ -148,7 +148,7 @@ global.mqttClient = mqtt.connect(`mqtt://${config.mqtt.host}`, { } }, res => { res.on('data', d => { - global.logger.log('info', 'notification', {message: `${d}`}); + global.logger.log('info', {message: `${d}`, label: 'notification'}); // process.stdout.write(d); }); });