*Pass child pino logger to dht-cache

This commit is contained in:
Derrick Hammer 2022-12-19 08:51:35 -05:00
parent 3fffc08d54
commit f164f7a6d3
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import jsonStringify from "json-stringify-deterministic";
// @ts-ignore
import crypto from "hypercore-crypto";
import NodeCache from "node-cache";
import { log } from "../../log.js";
export class RPCCache extends EventEmitter {
private server: RPCServer;
@ -18,6 +19,7 @@ export class RPCCache extends EventEmitter {
this._swarm = getSwarm();
this._dhtCache = new DHTCache(this._swarm, {
protocol: "lumeweb.rpccache",
logger: log.child({ module: "dht-cache" }),
});
this._data.on("del", (key: string) => {
try {