commit 8b37f6ef4987cb06b4682d5bd2cfc907fd9f8d2d
parent 027b26d1ac9d88a4cfc901cc2465e45bfe13e812
Author: Florian Dold <florian@dold.me>
Date: Thu, 23 May 2024 13:09:04 +0200
wallet-core: clean up logging, fix shepherd typo
Diffstat:
3 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts
@@ -128,7 +128,7 @@ export enum ObservabilityEventType {
TaskStart = "task-start",
TaskStop = "task-stop",
TaskReset = "task-reset",
- ShepherdTaskResult = "sheperd-task-result",
+ ShepherdTaskResult = "shepherd-task-result",
DeclareTaskDependency = "declare-task-dependency",
CryptoStart = "crypto-start",
CryptoFinishSuccess = "crypto-finish-success",
diff --git 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<void> {
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
@@ -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) {