Simplify logs. Still prints timestamp as json.

This commit is contained in:
mmcwilliams 2019-03-19 14:48:01 -04:00
parent 029dd628b6
commit a4682ed9d3
1 changed files with 5 additions and 8 deletions

View File

@ -8,7 +8,7 @@ const { Menu, MenuItem, ipcMain, BrowserWindow, app } = electron
const fs = require('fs')
const os = require('os')
const { createLogger, format, transports } = require('winston')
const { combine, timestamp, label, printf, prettyPrint } = format
const { combine, timestamp, label, printf, colorize, prettyPrint, simple } = format
const moment = require('moment')
const uuid = require('uuid')
const events = require('events')
@ -772,15 +772,12 @@ log.formatter = (options) => {
log.transport = createLogger({
transports: [
new (transports.Console)({
level: 'info',
json : false,
format : combine(
label({ label: 'mcopy-app' }),
timestamp(),
//format.colorize({ all: true }),
//format.splat(),
//format.json(),
format.simple(),
//log.formatter
colorize(),
simple()
)
}),
new (transports.File)({