Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log network address of DNS clients #1166

Merged
merged 1 commit into from
Aug 14, 2015
Merged

Log network address of DNS clients #1166

merged 1 commit into from
Aug 14, 2015

Conversation

ryanuber
Copy link
Member

Fixes #1163

@@ -628,7 +632,9 @@ func (d *DNSServer) handleRecurse(resp dns.ResponseWriter, req *dns.Msg) {
q := req.Question[0]
network := "udp"
defer func(s time.Time) {
d.logger.Printf("[DEBUG] dns: request for %v (%s) (%v)", q, network, time.Now().Sub(s))
d.logger.Printf("[DEBUG] dns: request for %v (%s) from client %s (%s)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're expecting to interpolate 4 terms and are passing in 5. I think the pattern for time is missing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah you're right, good catch!

@slackpad
Copy link
Contributor

LGTM

@ryanuber
Copy link
Member Author

Oops, forgot to merge this. Thanks!

ryanuber added a commit that referenced this pull request Aug 14, 2015
Log network address of DNS clients
@ryanuber ryanuber merged commit 134db62 into master Aug 14, 2015
@ryanuber ryanuber deleted the f-dns-log branch August 14, 2015 01:32
@sethvargo
Copy link
Contributor

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants