1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

Revert "Use logService for console messages (#214)" (#219)

This reverts commit 0fed528b6f.
This commit is contained in:
Matt Gibson
2020-12-04 13:58:32 -06:00
committed by GitHub
parent 0fed528b6f
commit 2b8c2c2b3e
10 changed files with 61 additions and 141 deletions

View File

@@ -17,13 +17,11 @@ import { AppIdService } from '../abstractions/appId.service';
import { AuthService as AuthServiceAbstraction } from '../abstractions/auth.service';
import { CryptoService } from '../abstractions/crypto.service';
import { I18nService } from '../abstractions/i18n.service';
import { LogService } from '../abstractions/log.service';
import { MessagingService } from '../abstractions/messaging.service';
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
import { TokenService } from '../abstractions/token.service';
import { UserService } from '../abstractions/user.service';
import { VaultTimeoutService } from '../abstractions/vaultTimeout.service';
import { ConsoleLogService } from '../services/consoleLog.service';
export const TwoFactorProviders = {
[TwoFactorProviderType.Authenticator]: {
@@ -93,12 +91,7 @@ export class AuthService implements AuthServiceAbstraction {
private userService: UserService, private tokenService: TokenService,
private appIdService: AppIdService, private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService, private messagingService: MessagingService,
private vaultTimeoutService: VaultTimeoutService, private logService?: LogService,
private setCryptoKeys = true) {
if (!logService) {
this.logService = new ConsoleLogService(false);
}
}
private vaultTimeoutService: VaultTimeoutService, private setCryptoKeys = true) { }
init() {
TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t('emailTitle');
@@ -358,7 +351,7 @@ export class AuthService implements AuthServiceAbstraction {
tokenResponse.privateKey = keyPair[1].encryptedString;
} catch (e) {
// tslint:disable-next-line
this.logService.error(e);
console.error(e);
}
}