*Use loglevel

This commit is contained in:
Derrick Hammer 2022-07-25 02:45:16 -04:00
parent 98050b90b0
commit 5cc06d62c5
1 changed files with 2 additions and 1 deletions

View File

@ -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();