Skip to content

Commit

Permalink
feat: add electron-log
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed May 24, 2024
1 parent 1b4b5fc commit e3c9dae
Show file tree
Hide file tree
Showing 5 changed files with 1,584 additions and 1,234 deletions.
4 changes: 3 additions & 1 deletion auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {}
declare global {

}
3 changes: 3 additions & 0 deletions electron/autoUpdaterManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { autoUpdater } from 'electron-updater'
import { BrowserWindow, MessageBoxOptions, dialog } from 'electron'
import { WalletManager } from './walletManager'
import { Actions } from './main'
import log from 'electron-log/main'

export class AutoUpdaterManager {
public isBeingUpdated: boolean = false
Expand All @@ -15,6 +16,8 @@ export class AutoUpdaterManager {

public run(actions: Actions) {
console.log('Checking for updates...')
log.transports.file.level = 'info'
autoUpdater.logger = log
autoUpdater.checkForUpdatesAndNotify()
autoUpdater.on('update-available', () => {
this.wallet.setIsUpdating(true)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"node": "20.9.0"
},
"devDependencies": {
"@electron/notarize": "^2.3.0",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@electron/notarize": "^2.3.0",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@intlify/unplugin-vue-i18n": "^3.0.1",
"@rushstack/eslint-patch": "^1.10.1",
Expand All @@ -71,6 +71,7 @@
"electron": "^29.1.6",
"electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0",
"electron-log": "^5.1.2",
"electron-updater": "^6.1.8",
"element-plus": "^2.6.3",
"eslint": "^8.57.0",
Expand Down
Loading

0 comments on commit e3c9dae

Please sign in to comment.