diff options
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/src/bench1.ts | 17 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 8 |
2 files changed, 17 insertions, 8 deletions
diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-wallet-cli/src/bench1.ts index 4a2651f36..ec0430d8d 100644 --- a/packages/taler-wallet-cli/src/bench1.ts +++ b/packages/taler-wallet-cli/src/bench1.ts @@ -40,16 +40,17 @@ export async function runBench1(configJson: any): Promise<void> { const b1conf = codecForBench1Config().decode(configJson); const myHttpLib = new NodeHttpLib(); - const wallet = await getDefaultNodeWallet({ - // No persistent DB storage. - persistentStoragePath: undefined, - httpLib: myHttpLib, - }); - await wallet.client.call(WalletApiOperation.InitWallet, {}); const numIter = b1conf.iterations ?? 1; for (let i = 0; i < numIter; i++) { + const wallet = await getDefaultNodeWallet({ + // No persistent DB storage. + persistentStoragePath: undefined, + httpLib: myHttpLib, + }); + await wallet.client.call(WalletApiOperation.InitWallet, {}); + await wallet.client.call(WalletApiOperation.WithdrawFakebank, { amount: "TESTKUDOS:10", bank: b1conf.bank, @@ -68,9 +69,9 @@ export async function runBench1(configJson: any): Promise<void> { await wallet.runTaskLoop({ stopWhenDone: true, }); - } - wallet.stop(); + wallet.stop(); + } } /** diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 142e98e7c..71431b5eb 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -43,6 +43,8 @@ import { Configuration, decodeCrock, rsaBlind, + LogLevel, + setGlobalLogLevelFromString, } from "@gnu-taler/taler-util"; import { NodeHttpLib, @@ -161,6 +163,12 @@ export const walletCli = clk setDangerousTimetravel(x / 1000); }, }) + .maybeOption("log", ["-L", "--log"], clk.STRING, { + help: "configure log level (NONE, ..., TRACE)", + onPresentHandler: (x) => { + setGlobalLogLevelFromString(x); + }, + }) .maybeOption("inhibit", ["--inhibit"], clk.STRING, { help: "Inhibit running certain operations, useful for debugging and testing.", |