mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
assign electron-log to updater
This commit is contained in:
parent
103c123cc5
commit
e505c63395
@ -4,10 +4,10 @@ import {
|
||||
MenuItem,
|
||||
shell,
|
||||
} from 'electron';
|
||||
import log from 'electron-log';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
|
||||
import { Main } from '../main';
|
||||
import { UpdaterLogger } from '../scripts/updaterLogger';
|
||||
import {
|
||||
isAppImage,
|
||||
isDev,
|
||||
@ -25,7 +25,7 @@ export class UpdaterMain {
|
||||
private canUpdate = false;
|
||||
|
||||
constructor(private main: Main) {
|
||||
autoUpdater.logger = new UpdaterLogger(main.logService);
|
||||
autoUpdater.logger = log;
|
||||
|
||||
const linuxCanUpdate = process.platform === 'linux' && isAppImage();
|
||||
const windowsCanUpdate = process.platform === 'win32' && !isWindowsStore() && !isWindowsPortable();
|
||||
|
@ -1,35 +0,0 @@
|
||||
import { Logger } from 'electron-updater';
|
||||
|
||||
import { LogService } from 'jslib/abstractions/log.service';
|
||||
|
||||
export class UpdaterLogger implements Logger {
|
||||
constructor(private logService: LogService) { }
|
||||
|
||||
debug(message: string): void {
|
||||
this.logService.debug(message);
|
||||
}
|
||||
|
||||
info(message?: any): void {
|
||||
if (message == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.logService.info(message);
|
||||
}
|
||||
|
||||
warn(message?: any): void {
|
||||
if (message == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.logService.warning(message);
|
||||
}
|
||||
|
||||
error(message?: any): void {
|
||||
if (message == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.logService.error(message);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user