const winston = require('winston');

const logger = winston.createLogger({
	levels: winston.config.syslog.levels,
	format: winston.format.combine(
		winston.format.timestamp(), // adds current timestamp
		winston.format.ms(),	// adds time since last log
		winston.format.simple(), // output as string. Use 'winston.format.prettyPrint()' for well formated json
	),
	transports: [
		new winston.transports.Console({
			handleExceptions: true,
		}),
	],
	exitOnError: false,
});


module.exports = logger;

@@ -30,16 +30,214 @@
 ton');%0A%0A
+let logLevel;%0A%0Aswitch (process.env.NODE_ENV) %7B%0A%09case 'development':%0A%09%09logLevel = 'debug';%0A%09%09break;%0A%09case 'test':%0A%09%09logLevel = 'error';%0A%09%09break;%0A%09case 'production':%0A%09default:%0A%09%09logLevel = 'info';%0A%7D%0A%0A
 const lo
@@ -605,16 +605,36 @@
 nsole(%7B%0A
+%09%09%09level: logLevel,%0A
 %09%09%09handl

add log level