Skip to content

Commit 1b9e2ec

Browse files
committed
feat: 🎸 update compound procedure logging
1 parent f50a794 commit 1b9e2ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/nfs/v4/server/Nfsv4Connection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ export class Nfsv4Connection {
113113
const {xid, proc} = procedure;
114114
switch (proc) {
115115
case Nfsv4Proc.COMPOUND: {
116-
// if (debug) logger.log('COMPOUND', procedure);
116+
if (debug) logger.log(`\n<COMPOUND{${xid}}>`);
117117
if (!(procedure.params instanceof Reader)) return;
118118
const compound = this.nfsDecoder.decodeCompoundRequest(procedure.params);
119119
if (compound instanceof msg.Nfsv4CompoundRequest) {
120120
new Nfsv4CompoundProcCtx(this, compound)
121121
.exec()
122122
.then((procResponse) => {
123-
// if (debug) logger.log('COMPOUND', procResponse);
123+
if (debug) logger.log(`</COMPOUND{${xid}}>`);
124124
this.nfsEncoder.writeAcceptedCompoundReply(xid, EMPTY_AUTH, procResponse);
125125
this.write(writer.flush());
126126
})
127127
.catch((err) => {
128-
logger.error('NFS COMPOUND error:', err);
128+
logger.error('NFS COMPOUND error:', xid, err);
129129
this.nfsEncoder.writeRejectedReply(xid, Nfsv4Stat.NFS4ERR_SERVERFAULT);
130130
});
131131
} else this.closeWithError(RpcAcceptStat.GARBAGE_ARGS);

0 commit comments

Comments
 (0)