diff --git a/src/main/base/app.ts b/src/main/base/app.ts index 908f93e0..585692e6 100644 --- a/src/main/base/app.ts +++ b/src/main/base/app.ts @@ -1,6 +1,7 @@ import {app, Menu, nativeImage, Tray} from 'electron'; import * as path from 'path'; -import {utils} from './utils' +import * as log from 'electron-log'; +import {utils} from './utils'; export class AppEvents { private protocols: string[] = [ @@ -24,6 +25,7 @@ export class AppEvents { * @returns {void} */ private start(): void { + AppEvents.initLogging() console.info('[AppEvents] App started'); /********************************************************************************************************************** @@ -284,4 +286,13 @@ export class AppEvents { ]) this.tray.setContextMenu(menu) } + + /** + * Initializes logging in the application + * @private + */ + private static initLogging() { + log.transports.console.format = '[{h}:{i}:{s}.{ms}] [{level}] {text}'; + Object.assign(console, log.functions); + } }