Skip to content

Commit f5e7597

Browse files
committed
cleanup autoupdated loging
1 parent c2d4174 commit f5e7597

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

main.ts

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ try {
6464
// Some APIs can only be used after this event occurs.
6565
app.on('ready', () => {
6666
createWindow();
67-
setupAutoUpdater();
67+
//setupAutoUpdaterLogging();
6868
autoUpdater.checkForUpdatesAndNotify();
6969
});
7070

@@ -91,32 +91,10 @@ try {
9191
}
9292

9393
//#region autoUpdater
94-
function setupAutoUpdater() {
94+
function setupAutoUpdaterLogging() {
95+
//%USERPROFILE%\AppData\Roaming\event-viewer-pp\logs\main.log
9596
const log = require("electron-log");
9697
log.transports.file.level = "debug";
97-
log.info('App starting...');
9898
autoUpdater.logger = log;
99-
100-
autoUpdater.on('checking-for-update', () => {
101-
console.log('Checking for update...');
102-
})
103-
autoUpdater.on('update-available', (info) => {
104-
console.log('Update available.');
105-
})
106-
autoUpdater.on('update-not-available', (info) => {
107-
console.log('Update not available.');
108-
})
109-
autoUpdater.on('error', (err) => {
110-
console.log('Error in auto-updater. ' + err);
111-
})
112-
autoUpdater.on('download-progress', (progressObj) => {
113-
let log_message = "Download speed: " + progressObj.bytesPerSecond;
114-
log_message = log_message + ' - Downloaded ' + progressObj.percent + '%';
115-
log_message = log_message + ' (' + progressObj.transferred + "/" + progressObj.total + ')';
116-
console.log(log_message);
117-
})
118-
autoUpdater.on('update-downloaded', (info) => {
119-
console.log('Update downloaded');
120-
});
12199
}
122100
//#endregion

0 commit comments

Comments
 (0)