[MM-51873] Create central logging module for adding prefixes to differentiate logs between modules (#2652)

* Create central logging module for adding prefixes to differentiate logs between modules

* Turn logger into class

* Merge'd

* Rework to use class more intelligently

* Fix modalView

* Fix webContentEvents

* Update src/main/app/intercom.ts

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* Shorten prefixes on object creation

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
This commit is contained in:
Devin Binnie
2023-04-05 12:09:56 -04:00
committed by GitHub
parent 865b00625e
commit 245215c678
42 changed files with 409 additions and 240 deletions

View File

@@ -6,11 +6,11 @@
import fs from 'fs';
import {Certificate, ipcMain} from 'electron';
import log from 'electron-log';
import {ComparableCertificate} from 'types/certificate';
import {UPDATE_PATHS} from 'common/communication';
import {Logger} from 'common/log';
import urlUtils from 'common/utils/url';
import * as Validator from 'common/Validator';
@@ -94,6 +94,6 @@ let certificateStore = new CertificateStore(certificateStorePath);
export default certificateStore;
ipcMain.on(UPDATE_PATHS, () => {
log.debug('certificateStore.UPDATE_PATHS');
new Logger('certificateStore').debug('UPDATE_PATHS');
certificateStore = new CertificateStore(certificateStorePath);
});