add debug log

This commit is contained in:
Ulric Qin 2022-04-19 18:41:49 +08:00
parent e79e5e4e27
commit e00fc95fdf
1 changed files with 4 additions and 0 deletions

View File

@ -160,6 +160,10 @@ func (p *Ping) gatherOnce(slist *list.SafeList, ins *PingInstance) {
}
func (ins *PingInstance) gather(slist *list.SafeList, target string) {
if config.Config.DebugMode {
log.Println("D! ping...", target)
}
labels := map[string]string{"target": target}
for k, v := range ins.Labels {
labels[k] = v