*Use loglevel
This commit is contained in:
parent
98050b90b0
commit
5cc06d62c5
|
@ -24,6 +24,7 @@ import {
|
||||||
} from "jayson";
|
} from "jayson";
|
||||||
import config, { updateUsePocketGateway, usePocketGateway } from "./config.js";
|
import config, { updateUsePocketGateway, usePocketGateway } from "./config.js";
|
||||||
import { ERR_NOT_READY, errorExit } from "./error.js";
|
import { ERR_NOT_READY, errorExit } from "./error.js";
|
||||||
|
import log from "loglevel";
|
||||||
|
|
||||||
const stringify = require("json-stable-stringify");
|
const stringify = require("json-stable-stringify");
|
||||||
const pendingRequests = new NodeCache();
|
const pendingRequests = new NodeCache();
|
||||||
|
@ -284,7 +285,7 @@ class RPCConnection {
|
||||||
try {
|
try {
|
||||||
that.write(pack(await maybeProcessRequest(request)));
|
that.write(pack(await maybeProcessRequest(request)));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.trace(error);
|
log.trace(error);
|
||||||
that.write(pack({ error }));
|
that.write(pack({ error }));
|
||||||
}
|
}
|
||||||
that.end();
|
that.end();
|
||||||
|
|
Loading…
Reference in New Issue