Skip to content

Commit

Permalink
fix(connections): do not log AgentContext object (#1085)
Browse files Browse the repository at this point in the history
Signed-off-by: Ariel Gentile <gentilester@gmail.com>
  • Loading branch information
genaris authored Nov 7, 2022
1 parent ab403c9 commit ef20f1e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/core/src/modules/connections/DidExchangeProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export class DidExchangeProtocol {
messageContext: InboundMessageContext<DidExchangeRequestMessage>,
outOfBandRecord: OutOfBandRecord
): Promise<ConnectionRecord> {
this.logger.debug(`Process message ${DidExchangeRequestMessage.type.messageTypeUri} start`, messageContext)
this.logger.debug(`Process message ${DidExchangeRequestMessage.type.messageTypeUri} start`, {
message: messageContext.message,
})

outOfBandRecord.assertRole(OutOfBandRole.Sender)
outOfBandRecord.assertState(OutOfBandState.AwaitResponse)
Expand Down Expand Up @@ -275,7 +277,10 @@ export class DidExchangeProtocol {
messageContext: InboundMessageContext<DidExchangeResponseMessage>,
outOfBandRecord: OutOfBandRecord
): Promise<ConnectionRecord> {
this.logger.debug(`Process message ${DidExchangeResponseMessage.type.messageTypeUri} start`, messageContext)
this.logger.debug(`Process message ${DidExchangeResponseMessage.type.messageTypeUri} start`, {
message: messageContext.message,
})

const { connection: connectionRecord, message } = messageContext

if (!connectionRecord) {
Expand Down Expand Up @@ -377,7 +382,10 @@ export class DidExchangeProtocol {
messageContext: InboundMessageContext<DidExchangeCompleteMessage>,
outOfBandRecord: OutOfBandRecord
): Promise<ConnectionRecord> {
this.logger.debug(`Process message ${DidExchangeCompleteMessage.type.messageTypeUri} start`, messageContext)
this.logger.debug(`Process message ${DidExchangeCompleteMessage.type.messageTypeUri} start`, {
message: messageContext.message,
})

const { connection: connectionRecord, message } = messageContext

if (!connectionRecord) {
Expand Down

0 comments on commit ef20f1e

Please sign in to comment.