From 643979800c366f85c099c98ad3f5ec370ad10adf Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Mon, 23 Jan 2023 11:17:30 +0800 Subject: [PATCH] chore: better log --- component/sniffer/dispatcher.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/component/sniffer/dispatcher.go b/component/sniffer/dispatcher.go index fd4fe98e..759e1043 100644 --- a/component/sniffer/dispatcher.go +++ b/component/sniffer/dispatcher.go @@ -101,13 +101,13 @@ func (sd *SnifferDispatcher) replaceDomain(metadata *C.Metadata, host string) { } originHost := metadata.Host if originHost != host { - log.Infoln("[Sniffer] Sniff TCP [%s:%s]-->[%s:%s] success, replace domain [%s]-->[%s]", - metadata.SrcIP, metadata.SrcPort, + log.Infoln("[Sniffer] Sniff TCP [%s]-->[%s:%s] success, replace domain [%s]-->[%s]", + metadata.SourceDetail(), dstIP, metadata.DstPort, metadata.Host, host) } else { - log.Debugln("[Sniffer] Sniff TCP [%s:%s]-->[%s:%s] success, replace domain [%s]-->[%s]", - metadata.SrcIP, metadata.SrcPort, + log.Debugln("[Sniffer] Sniff TCP [%s]-->[%s:%s] success, replace domain [%s]-->[%s]", + metadata.SourceDetail(), dstIP, metadata.DstPort, metadata.Host, host) }