package cooldns import ( "fmt" "log" "net" "github.com/miekg/dns" ) var debugFlag = false func debugLog(msg string) { if !debugFlag { return } log.Printf("DEBUG: %s", msg) } func debugRequest(r *dns.Msg, ip net.IP) { if !debugFlag { return } debugLog(fmt.Sprintf("Request from %s: %s", ip, r.String())) } func debugResponse(m *dns.Msg) { if !debugFlag { return } debugLog(fmt.Sprintf("Response send: %s", m.String())) }