Skip to content

Commit 2d69b31

Browse files
change info to debug (#13)
Signed-off-by: xiang <[email protected]>
1 parent 7ced936 commit 2d69b31

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

chaos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ func (k Kubernetes) chaosDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M
6262
switch state.QType() {
6363
case dns.TypeA:
6464
ips := []net.IP{getRandomIPv4()}
65-
log.Infof("dns.TypeA %v", ips)
65+
log.Debugf("dns.TypeA %v", ips)
6666
answers = a(qname, 10, ips)
6767
case dns.TypeAAAA:
6868
// TODO: return random IP
6969
ips := []net.IP{net.IP{0x20, 0x1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0x1, 0x23, 0, 0x12, 0, 0x1}}
70-
log.Infof("dns.TypeAAAA %v", ips)
70+
log.Debugf("dns.TypeAAAA %v", ips)
7171
answers = aaaa(qname, 10, ips)
7272
}
7373

handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ import (
1313
func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
1414
state := request.Request{W: w, Req: r}
1515
sourceIP := state.IP()
16-
log.Infof("k8s ServeDNS, source IP: %s, state: %v", sourceIP, state)
16+
log.Debugf("k8s ServeDNS, source IP: %s, state: %v", sourceIP, state)
1717

1818
chaosPod, err := k.getChaosPod(sourceIP)
1919
if err != nil {
2020
log.Infof("fail to get pod information from cluster, IP: %s, error: %v", sourceIP, err)
2121
}
2222

2323
records, extra, zone, err := k.getRecords(ctx, state)
24-
log.Infof("records: %v, err: %v", records, err)
24+
log.Debugf("records: %v, err: %v", records, err)
2525

2626
if k.needChaos(chaosPod, records, err) {
2727
return k.chaosDNS(ctx, w, r, state, chaosPod)

0 commit comments

Comments
 (0)