[MM-41999] Add additional logging for debugging, allow users to change log level (#2031)
* Add debug logging switch * Add tests * Mock electron-log globally in jest * New logs for debugging * Switch to a dropdown to choose log levels * Fix tests * Update wording
This commit is contained in:
@@ -295,6 +295,7 @@ function initializeAfterAppReady() {
|
||||
if (typeof Config.canUpgrade === 'undefined') {
|
||||
// windows might not be ready, so we have to wait until it is
|
||||
Config.once('update', () => {
|
||||
log.debug('Initialize.checkForUpdates');
|
||||
if (Config.canUpgrade && Config.autoCheckForUpdates) {
|
||||
setTimeout(() => {
|
||||
updateManager.checkForUpdates(false);
|
||||
@@ -342,6 +343,7 @@ function initializeAfterAppReady() {
|
||||
|
||||
// listen for status updates and pass on to renderer
|
||||
UserActivityMonitor.on('status', (status) => {
|
||||
log.debug('Initialize.UserActivityMonitor.on(status)', status);
|
||||
WindowManager.sendToMattermostViews(USER_ACTIVITY_UPDATE, status);
|
||||
});
|
||||
|
||||
@@ -354,6 +356,7 @@ function initializeAfterAppReady() {
|
||||
setupBadge();
|
||||
|
||||
defaultSession.on('will-download', (event, item, webContents) => {
|
||||
log.debug('Initialize.will-download', {item, sourceURL: webContents.getURL()});
|
||||
const filename = item.getFilename();
|
||||
const fileElements = filename.split('.');
|
||||
const filters = [];
|
||||
|
Reference in New Issue
Block a user