mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-08 09:01:00 +03:00
c
This commit is contained in:
3
app.js
3
app.js
@@ -5,6 +5,7 @@ const path = require('path');
|
|||||||
/* */
|
/* */
|
||||||
const {createLogger, format, transports} = require('winston');
|
const {createLogger, format, transports} = require('winston');
|
||||||
const {combine, timestamp, printf} = format;
|
const {combine, timestamp, printf} = format;
|
||||||
|
var nullTransport = require('winston-null');
|
||||||
/* express and https */
|
/* express and https */
|
||||||
const ejs = require('ejs');
|
const ejs = require('ejs');
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
@@ -36,7 +37,7 @@ global.logger = createLogger({
|
|||||||
return `${timestamp} ${level}: ${message}`;
|
return `${timestamp} ${level}: ${message}`;
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
transports: [],
|
transports: [nullTransport],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (clArgv.indexOf('--log-info') > -1) global.logger.add(new transports.Console());
|
if (clArgv.indexOf('--log-info') > -1) global.logger.add(new transports.Console());
|
||||||
|
Reference in New Issue
Block a user