From a4682ed9d329b896840203cc985bed2a9b458a2d Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 19 Mar 2019 14:48:01 -0400 Subject: [PATCH] Simplify logs. Still prints timestamp as json. --- app/main.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/main.js b/app/main.js index 24c898b..6979b84 100644 --- a/app/main.js +++ b/app/main.js @@ -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,19 +772,16 @@ 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)({ - filename: log.file() + filename: log.file() }) ] })