more logging

This commit is contained in:
Moon Man 2024-01-28 12:21:27 -05:00
parent 59aa384ec6
commit f0660ca220
2 changed files with 2 additions and 2 deletions

2
dist/main.js vendored
View File

@ -17,7 +17,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4);
if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\n`);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).join(' ')})\n`);
const termBytes = process.stdin.read(termLen);
if (termBytes) {
const decoded = this.bert.decode(termBytes);

View File

@ -22,7 +22,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4);
if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\n`);
process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes.toString('hex').match(/../g).join(' ')})\n`);
const termBytes = process.stdin.read(termLen);
if (termBytes) {