diff options
author | 2018-10-31 21:03:46 +0000 | |
---|---|---|
committer | 2018-10-31 21:03:46 +0000 | |
commit | 1ef0a02b467ac234b9f99ed3060d31ff6a2ca546 (patch) | |
tree | 7b91f6ee6a975375628f623c74d92b815e7ea0bd /plugin/forward/forward.go | |
parent | e332c8d8cbef30f07b74e07dc5efd18c37b7da2a (diff) | |
download | coredns-1ef0a02b467ac234b9f99ed3060d31ff6a2ca546.tar.gz coredns-1ef0a02b467ac234b9f99ed3060d31ff6a2ca546.tar.zst coredns-1ef0a02b467ac234b9f99ed3060d31ff6a2ca546.zip |
Revert "log/forward plugins: Extend dns query logging (#2240)" (#2256)
This reverts commit 8045aa279b510793a7c083a50de66e1df8871564.
Diffstat (limited to 'plugin/forward/forward.go')
-rw-r--r-- | plugin/forward/forward.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go index 02824d184..dfa1aaca1 100644 --- a/plugin/forward/forward.go +++ b/plugin/forward/forward.go @@ -12,7 +12,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/debug" - "github.com/coredns/coredns/plugin/metadata" clog "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" @@ -60,15 +59,6 @@ func (f *Forward) Len() int { return len(f.proxies) } // Name implements plugin.Handler. func (f *Forward) Name() string { return "forward" } -//declareMetadata adds to the context a metadata parameter which will return the passed value. -func (f *Forward) declareMetadata(ctx context.Context, name string, value string) bool { - label := f.Name()+"/"+name - if metadata.IsLabel(label) { - return metadata.SetValueFunc(ctx, label, func() string { return value }) - } - return false -} - // ServeDNS implements plugin.Handler. func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { @@ -158,12 +148,10 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg formerr := state.ErrorMessage(dns.RcodeFormatError) w.WriteMsg(formerr) - f.declareMetadata(ctx, "resolving_proxy", proxy.addr) return 0, nil } w.WriteMsg(ret) - f.declareMetadata(ctx, "resolving_proxy", proxy.addr) return 0, nil } |