mirror of
https://github.com/coredns/coredns.git
synced 2025-11-21 11:22:20 -05:00
plugin/log: log remote port addr as well (#1573)
Log the remote's port, for IPv6 addr this means we should enclose the v6 address in brackets; make this the default for 'remote'.
This commit is contained in:
@@ -59,7 +59,7 @@ The following place holders are supported:
|
||||
* `{class}`: qclass of the request
|
||||
* `{proto}`: protocol used (tcp or udp)
|
||||
* `{when}`: time of the query
|
||||
* `{remote}`: client's IP address
|
||||
* `{remote}`: client's IP address, for IPv6 addresses these are enclosed in brackets: `[::1]`
|
||||
* `{size}`: request size in bytes
|
||||
* `{port}`: client's port
|
||||
* `{duration}`: response duration
|
||||
@@ -75,7 +75,7 @@ The following place holders are supported:
|
||||
The default Common Log Format is:
|
||||
|
||||
~~~ txt
|
||||
`{remote} - [{when}] {>id} "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {>rflags} {rsize} {duration}`
|
||||
`{remote}:{port} - [{when}] {>id} "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {>rflags} {rsize} {duration}`
|
||||
~~~
|
||||
|
||||
## Examples
|
||||
|
||||
Reference in New Issue
Block a user