From 8b37f6ef4987cb06b4682d5bd2cfc907fd9f8d2d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 23 May 2024 13:09:04 +0200 Subject: wallet-core: clean up logging, fix shepherd typo --- packages/taler-wallet-core/src/shepherd.ts | 2 +- packages/taler-wallet-core/src/wallet.ts | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'packages/taler-wallet-core/src') diff --git a/packages/taler-wallet-core/src/shepherd.ts b/packages/taler-wallet-core/src/shepherd.ts index 3b160d97f..dbdd7aac5 100644 --- a/packages/taler-wallet-core/src/shepherd.ts +++ b/packages/taler-wallet-core/src/shepherd.ts @@ -256,7 +256,7 @@ export class TaskSchedulerImpl implements TaskScheduler { async reload(): Promise { await this.ensureRunning(); const tasksIds = [...this.sheps.keys()]; - logger.info(`reloading sheperd with ${tasksIds.length} tasks`); + logger.info(`reloading shepherd with ${tasksIds.length} tasks`); for (const taskId of tasksIds) { this.stopShepherdTask(taskId); } diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 68da15410..49ffbcfb6 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -721,12 +721,9 @@ async function dispatchRequestInternal( case WalletApiOperation.InitWallet: { const req = codecForInitRequest().decode(payload); - logger.info(`init request: ${j2s(req)}`); - - if (wex.ws.initCalled) { - logger.info("initializing wallet (repeat initialization)"); - } else { - logger.info("initializing wallet (first initialization)"); + if (logger.shouldLogTrace()) { + const initType = wex.ws.initCalled ? "repeat initialization" : "first initialization"; + logger.trace(`init request (${initType}): ${j2s(req)}`); } // Write to the DB to make sure that we're failing early in @@ -1832,11 +1829,6 @@ class WalletDbTriggerSpec implements TriggerSpec { if (info.mode !== "readwrite") { return; } - logger.info( - `in after commit callback for readwrite, modified ${j2s([ - ...info.modifiedStores, - ])}`, - ); const modified = info.accessedStores; if ( modified.has(WalletStoresV1.exchanges.storeName) || @@ -1924,8 +1916,6 @@ export class InternalWalletState { initWithConfig(newConfig: WalletRunConfig): void { this._config = newConfig; - logger.info(`setting new config to ${j2s(newConfig)}`); - this._http = this.httpFactory(newConfig); if (this.config.testing.devModeActive) { -- cgit v1.2.3