From 78292c471aea1d9a3b09ef9e37a87d4dfbc097ba Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 9 Apr 2021 11:23:00 +1000 Subject: [PATCH] Enable nim-waku trace logs --- src/test_utils/nim_waku.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index 811c1eeb5a..a52b5685b9 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -29,6 +29,17 @@ export interface Args { rpcAdmin?: boolean; nodekey?: string; portsShift?: number; + logLevel?: LogLevel; +} + +export enum LogLevel { + Error = 'error', + Info = 'info', + Warn = 'warn', + Debug = 'debug', + Trace = 'trace', + Notice = 'notice', + Fatal = 'fatal', } export class NimWaku { @@ -61,7 +72,11 @@ export class NimWaku { const mergedArgs = defaultArgs(); // Object.assign overrides the properties with the source (if there are conflicts) - Object.assign(mergedArgs, { portsShift: this.portsShift }, args); + Object.assign( + mergedArgs, + { portsShift: this.portsShift, logLevel: LogLevel.Trace }, + args + ); const argsArray = argsToArray(mergedArgs); this.process = spawn(NIM_WAKU_BIN, argsArray, {