From 5cc06d62c58a2bcc44422f035a2ff8c56c49c067 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 25 Jul 2022 02:45:16 -0400 Subject: [PATCH] *Use loglevel --- src/rpc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc.ts b/src/rpc.ts index 477ccc8..582b617 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -24,6 +24,7 @@ import { } from "jayson"; import config, { updateUsePocketGateway, usePocketGateway } from "./config.js"; import { ERR_NOT_READY, errorExit } from "./error.js"; +import log from "loglevel"; const stringify = require("json-stable-stringify"); const pendingRequests = new NodeCache(); @@ -284,7 +285,7 @@ class RPCConnection { try { that.write(pack(await maybeProcessRequest(request))); } catch (error) { - console.trace(error); + log.trace(error); that.write(pack({ error })); } that.end();