From f61ea45f3b2b60217901f6110d5fef3193812062 Mon Sep 17 00:00:00 2001 From: Oleksii Malovanyi Date: Mon, 16 Aug 2021 23:58:58 +0400 Subject: [PATCH] modify debugger to write packet via log's Writer (#306) --- debug.go | 2 +- v3/debug.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debug.go b/debug.go index 2c0b30c8..d0a8fc15 100644 --- a/debug.go +++ b/debug.go @@ -25,6 +25,6 @@ func (debug debugging) Printf(format string, args ...interface{}) { // PrintPacket dumps a packet. func (debug debugging) PrintPacket(packet *ber.Packet) { if debug { - ber.PrintPacket(packet) + ber.WritePacket(log.Writer(), packet) } } diff --git a/v3/debug.go b/v3/debug.go index 2c0b30c8..d0a8fc15 100644 --- a/v3/debug.go +++ b/v3/debug.go @@ -25,6 +25,6 @@ func (debug debugging) Printf(format string, args ...interface{}) { // PrintPacket dumps a packet. func (debug debugging) PrintPacket(packet *ber.Packet) { if debug { - ber.PrintPacket(packet) + ber.WritePacket(log.Writer(), packet) } }