log/forward plugins: Extend dns query logging (#2240)

Automatically submitted.
This commit is contained in:
Dzmitry Razhanski
2018-10-29 21:50:31 +03:00
committed by corbot[bot]
parent e6d02a3fd2
commit 8045aa279b
7 changed files with 55 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ func (l Logger) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
// If we don't set up a class in config, the default "all" will be added
// and we shouldn't have an empty rule.Class.
if rule.Class[response.All] || rule.Class[class] {
rep := replacer.New(r, rrw, CommonLogEmptyValue)
rep := replacer.New(ctx, r, rrw, CommonLogEmptyValue)
rule.Log.Println(rep.Replace(rule.Format))
}