优化日志打印格式
This commit is contained in:
2
cap.go
2
cap.go
@@ -93,7 +93,7 @@ func startPacketCapture() {
|
||||
|
||||
// 创建数据包源,用于从网络接口读取数据包
|
||||
packetSource := gopacket.NewPacketSource(handle, handle.LinkType())
|
||||
fmt.Printf("正在监听网络接口 %s, 使用过滤器 '%s'...\n", *InterfaceName, *Protocol)
|
||||
log.Printf(" 正在监听网络接口 %s, 使用过滤器 '%s'...\n", *InterfaceName, *Protocol)
|
||||
|
||||
// 创建信号通道,用于捕获中断信号
|
||||
sigChan := make(chan os.Signal, 1)
|
||||
|
||||
Reference in New Issue
Block a user