compat fixes

This commit is contained in:
Eugene Pankov
2019-05-24 21:19:08 +02:00
parent 4c0bf62b7b
commit a8bbdea224
4 changed files with 10 additions and 8 deletions

View File

@@ -11,22 +11,20 @@ const initializeWinston = (electron: ElectronService) => {
fs.mkdirSync(logDirectory)
}
return new winston.Logger({
return winston.createLogger({
transports: [
new winston.transports.File({
level: 'debug',
filename: path.join(logDirectory, 'log.txt'),
format: winston.format.simple(),
handleExceptions: false,
json: false,
maxsize: 5242880,
maxFiles: 5,
colorize: false
}),
new winston.transports.Console({
level: 'debug',
handleExceptions: false,
json: false,
colorize: true
format: winston.format.colorize(),
})
],
exitOnError: false