diff --git a/common/framing/framing.go b/common/framing/framing.go index b21df65..14fc41e 100644 --- a/common/framing/framing.go +++ b/common/framing/framing.go @@ -160,6 +160,10 @@ type BaseDecoder struct { logger log.Logger } +func (decoder *BaseDecoder) SetLogger(logger log.Logger) { + decoder.logger = logger +} + func (decoder *BaseDecoder) InitBuffers() { decoder.ReceiveBuffer = bytes.NewBuffer(nil) decoder.ReceiveDecodedBuffer = bytes.NewBuffer(nil) diff --git a/riverrun.go b/riverrun.go index b10ff6a..441092e 100644 --- a/riverrun.go +++ b/riverrun.go @@ -266,6 +266,7 @@ type riverrunDecoder struct { func newRiverrunDecoder(key []byte, readStream cipher.Stream, revTable8, revTable16 map[uint64]uint64, compressedBlockBits, expandedBlockBits uint64, logger log.Logger) *riverrunDecoder { decoder := new(riverrunDecoder) decoder.logger = logger + decoder.BaseDecoder.SetLogger(logger) decoder.Drbg = f.GenDrbg(key[:]) decoder.LengthLength = int(ctstretch.ExpandedNBytes(uint64(f.LengthLength), compressedBlockBits, expandedBlockBits))