Преглед на файлове

Small logger fix

tags/1.0^2
9seconds преди 6 години
родител
ревизия
61450ea3db
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6
    0
      wrappers/packetack/client_intermediate_secure.go

+ 6
- 0
wrappers/packetack/client_intermediate_secure.go Целия файл

@@ -6,6 +6,8 @@ import (
6 6
 	"fmt"
7 7
 	"math/rand"
8 8
 
9
+	"go.uber.org/zap"
10
+
9 11
 	"github.com/9seconds/mtg/conntypes"
10 12
 )
11 13
 
@@ -45,6 +47,10 @@ func (w *wrapperClientIntermediateSecure) Write(packet conntypes.Packet, acks *c
45 47
 	return nil
46 48
 }
47 49
 
50
+func (w *wrapperClientIntermediateSecure) Logger() *zap.SugaredLogger {
51
+	return w.parent.Logger().Named("client-intermediate-secure")
52
+}
53
+
48 54
 func NewClientIntermediateSecure(parent conntypes.StreamReadWriteCloser) conntypes.PacketAckFullReadWriteCloser {
49 55
 	return &wrapperClientIntermediateSecure{
50 56
 		wrapperClientIntermediate: wrapperClientIntermediate{

Loading…
Отказ
Запис