From f0124247dba0c7f31a8f3c66dfac844f9d32e748 Mon Sep 17 00:00:00 2001 From: balzack Date: Mon, 8 Jul 2024 09:10:46 -0700 Subject: [PATCH] logging cleanup --- app/sdk/src/index.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/sdk/src/index.ts b/app/sdk/src/index.ts index e2d6322a..728bce29 100644 --- a/app/sdk/src/index.ts +++ b/app/sdk/src/index.ts @@ -11,38 +11,38 @@ export * from './types'; export class DatabagSDK { - private logging: Logging; + private log: Logging; private crypto: Crypto | null; private store: SqlStore | WebStore | null = null; - constructor(crypto: Crypto | null, logging: Logging | null) { + constructor(crypto: Crypto | null, log: Logging | null) { this.crypto = crypto; - this.logging = logging ? logging : new ConsoleLogging(); - this.logging.info("databag sdk"); + this.log = log ? log : new ConsoleLogging(); + this.log.info("databag sdk"); } public async initOfflineStore(sql: SqlStore): Promise { this.store = sql; // initialize - return new SessionModule(this.store, this.crypto, this.logging, '', ''); + return new SessionModule(this.store, this.crypto, this.log, '', ''); } public async initOnlineStore(web: WebStore): Promise { this.store = web; // initialize - return new SessionModule(this.store, this.crypto, this.logging, '', ''); + return new SessionModule(this.store, this.crypto, this.log, '', ''); } public async login(handle: string, password: string, url: string, mfaCode: string | null, params: SessionParams): Promise { - return new SessionModule(this.store, this.crypto, this.logging, '', ''); + return new SessionModule(this.store, this.crypto, this.log, '', ''); } public async access(url: string, token: string, params: SessionParams): Promise { - return new SessionModule(this.store, this.crypto, this.logging, '', ''); + return new SessionModule(this.store, this.crypto, this.log, '', ''); } public async create(handle: string, password: string, url: string, token: string | null, params: SessionParams): Promise { - return new SessionModule(this.store, this.crypto, this.logging, '', ''); + return new SessionModule(this.store, this.crypto, this.log, '', ''); } public async logout(session: Session): Promise { @@ -50,10 +50,10 @@ export class DatabagSDK { } public async configure(token: string, url: string, mfaCode: string | null): Promise { - return new NodeModule(this.logging, '', ''); + return new NodeModule(this.log, '', ''); } public async automate() { - return new BotModule(this.logging); + return new BotModule(this.log); } }