Skip to content

Commit

Permalink
[MM-61058] Upgrade electron-log, turn on async logging (#3173)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbinnie authored Oct 23, 2024
1 parent 9de4f6c commit 97a872a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"electron-context-menu": "3.6.1",
"electron-extension-installer": "1.2.0",
"electron-is-dev": "2.0.0",
"electron-log": "5.1.1",
"electron-log": "5.2.0",
"electron-updater": "6.3.0",
"joi": "17.12.2",
"macos-notification-state": "3.0.0",
Expand Down
4 changes: 4 additions & 0 deletions src/common/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import log from 'electron-log';

import Util from 'common/utils/util';

// Turn off sync logging to prevent blocking the main thread
// One downside to this is that some logs may not be written to the log file when the app closes
log.transports.file.sync = false;

export const setLoggingLevel = (level: string) => {
if (log.transports.file.level === level) {
return;
Expand Down

0 comments on commit 97a872a

Please sign in to comment.