[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:
@@ -1,14 +1,17 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import log from 'electron-log';
|
||||
|
||||
import {Certificate, WebContents} from 'electron';
|
||||
|
||||
import {CertificateModalData} from 'types/certificate';
|
||||
|
||||
import {Logger} from 'common/log';
|
||||
|
||||
import modalManager from './views/modalManager';
|
||||
import {getLocalURLString, getLocalPreload} from './utils';
|
||||
import MainWindow from './windows/mainWindow';
|
||||
|
||||
const log = new Logger('CertificateManager');
|
||||
const preload = getLocalPreload('desktopAPI.js');
|
||||
const html = getLocalURLString('certificateModal.html');
|
||||
|
||||
@@ -24,7 +27,7 @@ export class CertificateManager {
|
||||
}
|
||||
|
||||
handleSelectCertificate = (event: Event, webContents: WebContents, url: string, list: Certificate[], callback: (certificate?: Certificate | undefined) => void) => {
|
||||
log.verbose('CertificateManager.handleSelectCertificate', url, list);
|
||||
log.verbose('handleSelectCertificate', url, list);
|
||||
|
||||
if (list.length > 1) {
|
||||
event.preventDefault(); // prevent the app from getting the first certificate available
|
||||
|
Reference in New Issue
Block a user