From 8ba62f7e0e0e6208738ccff2c9da99e6353ec961 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 23 Oct 2023 16:16:52 +0200 Subject: wallet-core: native logging support --- packages/taler-wallet-core/src/host-impl.qtart.ts | 6 +++++- packages/taler-wallet-core/src/wallet-api-types.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src') diff --git a/packages/taler-wallet-core/src/host-impl.qtart.ts b/packages/taler-wallet-core/src/host-impl.qtart.ts index 85f8df6e5..a2fc75e9c 100644 --- a/packages/taler-wallet-core/src/host-impl.qtart.ts +++ b/packages/taler-wallet-core/src/host-impl.qtart.ts @@ -38,7 +38,7 @@ import { import { AccessStats } from "@gnu-taler/idb-bridge"; import { SynchronousCryptoWorkerFactoryPlain } from "./crypto/workers/synchronousWorkerFactoryPlain.js"; import { openTalerDatabase } from "./index.js"; -import { Logger } from "@gnu-taler/taler-util"; +import { Logger, enableNativeLogging } from "@gnu-taler/taler-util"; import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { SetTimeoutTimerAPI } from "./util/timer.js"; import { Wallet } from "./wallet.js"; @@ -167,6 +167,10 @@ export async function createNativeWalletHost2( let dbResp: MakeDbResult; + if (args.config?.features?.useNativeLogging) { + enableNativeLogging(); + } + if ( args.persistentStoragePath && args.persistentStoragePath.endsWith(".json") diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index b974aa4bb..daffd40ac 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -292,6 +292,7 @@ export interface WalletConfig { */ features: { allowHttp: boolean; + useNativeLogging: boolean; }; } -- cgit v1.2.3