mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-08 14:20:18 +08:00
使用logger尝试控制日志输出级别
This commit is contained in:
@@ -2,6 +2,7 @@ package fragmentation
|
||||
|
||||
import (
|
||||
"log"
|
||||
"netstack/logger"
|
||||
"netstack/tcpip/buffer"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -71,7 +72,9 @@ func (f *Fragmentation) Process(id uint32, first, last uint16, more bool, vv buf
|
||||
|
||||
f.mu.Lock()
|
||||
f.size += consumed
|
||||
log.Printf("[%d]的分片 [%d,%d] 合并中\n", id, first, last)
|
||||
logger.GetInstance().Info(logger.IP, func() {
|
||||
log.Printf("[%d]的分片 [%d,%d] 合并中\n", id, first, last)
|
||||
})
|
||||
if done {
|
||||
f.release(r)
|
||||
}
|
||||
|
Reference in New Issue
Block a user