Log truncated (#3136)

* Log truncated

* add related address
This commit is contained in:
Raja Subramanian
2024-10-24 16:24:54 +05:30
committed by GitHub
parent b8c6b1f1ec
commit fbdc2491d9
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -152,6 +152,10 @@ func (w wrappedICECandidatePairLogger) MarshalLogObject(e zapcore.ObjectEncoder)
e.AddString("remoteCandidateType", w.pair.Remote.Typ.String())
e.AddString("remoteAdddress", w.pair.Remote.Address[:len(w.pair.Remote.Address)-3]+"...")
e.AddUint16("remotePort", w.pair.Remote.Port)
if w.pair.Remote.RelatedAddress != "" {
e.AddString("relatedAdddress", w.pair.Remote.RelatedAddress[:len(w.pair.Remote.RelatedAddress)-3]+"...")
e.AddUint16("relatedPort", w.pair.Remote.RelatedPort)
}
}
return nil
}