From 94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 26 Jan 2020 19:47:38 +0100 Subject: Less logs but better logs --- util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util.go') diff --git a/util.go b/util.go index 30f9681..d8ae58e 100644 --- a/util.go +++ b/util.go @@ -40,8 +40,9 @@ func consulToDN(key string) (string, string) { } dn = cpath + dn } - log.Printf("Consul key %s does not end with attribute=something", key) - panic("TODO don't panic handle this") + // TODO don't panic, handle this + log.Panicf("Consul key %s does not end with attribute=something", key) + panic("unreachable") } func parseValue(value []byte) ([]string, error) { @@ -64,7 +65,6 @@ func parseConsulResult(data []*consul.KVPair) (map[string]Entry, error) { aggregator := map[string]Entry{} for _, kv := range data { - log.Printf("(parseConsulResult) %s %s", kv.Key, string(kv.Value)) dn, attr := consulToDN(kv.Key) if _, exists := aggregator[dn]; !exists { aggregator[dn] = Entry{} -- cgit v1.2.3