mirror of https://github.com/waku-org/js-waku.git
Enable nim-waku trace logs
This commit is contained in:
parent
27540fae47
commit
78292c471a
|
@ -29,6 +29,17 @@ export interface Args {
|
||||||
rpcAdmin?: boolean;
|
rpcAdmin?: boolean;
|
||||||
nodekey?: string;
|
nodekey?: string;
|
||||||
portsShift?: number;
|
portsShift?: number;
|
||||||
|
logLevel?: LogLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum LogLevel {
|
||||||
|
Error = 'error',
|
||||||
|
Info = 'info',
|
||||||
|
Warn = 'warn',
|
||||||
|
Debug = 'debug',
|
||||||
|
Trace = 'trace',
|
||||||
|
Notice = 'notice',
|
||||||
|
Fatal = 'fatal',
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NimWaku {
|
export class NimWaku {
|
||||||
|
@ -61,7 +72,11 @@ export class NimWaku {
|
||||||
const mergedArgs = defaultArgs();
|
const mergedArgs = defaultArgs();
|
||||||
|
|
||||||
// Object.assign overrides the properties with the source (if there are conflicts)
|
// 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);
|
const argsArray = argsToArray(mergedArgs);
|
||||||
this.process = spawn(NIM_WAKU_BIN, argsArray, {
|
this.process = spawn(NIM_WAKU_BIN, argsArray, {
|
||||||
|
|
Loading…
Reference in New Issue