-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add client ip to http access logs #1448
Conversation
Hi @gozer - would you mind sticking the address at the end of the log message and using the new log functions from memberlist, so these will all look the same? Here's an example: https://github.com/hashicorp/consul/blob/master/consul/rpc.go#L86. There's a |
Absolutely, will do and update my PR |
memberlist.LogAddress wants a net.Addr, and req.RemoteAddr is already just a string, not an address anymore, so not sure it's worth trying to convert it back to a net.Addr |
…e/1447/http-access-logs
@gozer sorry I didn't realize that. In that case, it should be good enough to stick it at the end as |
@slackpad done as suggested |
@gozer thanks for the update! One other thing - I think your |
…e/1447/http-access-logs
@slackpad, you are absolutely correct, that address splitting had bothered me from the start, to be honest. Removed as suggested. |
Add client ip to http access logs
LGTM - Thanks! |
Fixes #1447