import winston from "winston";

winston.emitErrs = true;
const tsFormat = () => (new Date().toLocaleString());
const log = new winston.Logger({
	transports: [
		// new winston.transports.File({
		// 	level: 'info',
		// 	filename: './all-logs.log',
		// 	handleExceptions: true,
		// 	json: true,
		// 	maxsize: 5242880, //5MB
		// 	maxFiles: 5,
		// 	colorize: false
		// }),
		new (winston.transports.Console)({
			colorize: true,
			json: false,
			prettyPrint: true,
			handleExceptions: true,
			timestamp: tsFormat,
			//label: module.filename.split('/').slice(-2).join('/'),
			level: 'debug'
		})
	],
	exitOnError: false
});

module.exports = log;
module.exports.stream = {
	write: function (message, encoding) {
		log.debug(message.trim());
	}
};






@@ -750,12 +750,77 @@
 %0A%09%7D%0A%7D;%0A%0A
+//TODO If we're not in production only then log to the %60console%60%0A
 %0A%0A%0A%0A

add todo