mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
docs: update README and log plugin (#3602)
README: remove the logo thing as we stopped doing that
log: remote the lines about the clock output as that's gone as well and
discuss the query log vs other logging a bit.
Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
26
README.md
26
README.md
@@ -77,25 +77,20 @@ The above command alone will have `coredns` binary generated.
|
|||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
When starting CoreDNS without any configuration, it loads the
|
When starting CoreDNS without any configuration, it loads the
|
||||||
[*whoami*](https://coredns.io/plugins/whoami) plugin and starts listening on port 53 (override with
|
[*whoami*](https://coredns.io/plugins/whoami) and [*log*](https://coredns.io/plugins/log) plugins
|
||||||
`-dns.port`), it should show the following:
|
and starts listening on port 53 (override with `-dns.port`), it should show the following:
|
||||||
|
|
||||||
~~~ txt
|
~~~ txt
|
||||||
.:53
|
.:53
|
||||||
______ ____ _ _______
|
CoreDNS-1.6.6
|
||||||
/ ____/___ ________ / __ \/ | / / ___/ ~ CoreDNS-1.6.3
|
linux/amd64, go1.13.5, aa8c32
|
||||||
/ / / __ \/ ___/ _ \/ / / / |/ /\__ \ ~ linux/amd64, go1.13,
|
|
||||||
/ /___/ /_/ / / / __/ /_/ / /| /___/ /
|
|
||||||
\____/\____/_/ \___/_____/_/ |_//____/
|
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Any query sent to port 53 should return some information; your sending address, port and protocol
|
Any query sent to port 53 should return some information; your sending address, port and protocol
|
||||||
used.
|
used. The query should also be logged to standard output.
|
||||||
|
|
||||||
If you have a Corefile without a port number specified it will, by default, use port 53, but you can
|
If you have a Corefile without a port number specified it will, by default, use port 53, but you can
|
||||||
override the port with the `-dns.port` flag:
|
override the port with the `-dns.port` flag: `coredns -dns.port 1053`, runs the server on port 1053.
|
||||||
|
|
||||||
`./coredns -dns.port 1053`, runs the server on port 1053.
|
|
||||||
|
|
||||||
Start a simple proxy. You'll need to be root to start listening on port 53.
|
Start a simple proxy. You'll need to be root to start listening on port 53.
|
||||||
|
|
||||||
@@ -108,11 +103,11 @@ Start a simple proxy. You'll need to be root to start listening on port 53.
|
|||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Just start CoreDNS: `./coredns`. Then just query on that port (53). The query should be forwarded
|
Start CoreDNS and then query on that port (53). The query should be forwarded to 8.8.8.8 and the
|
||||||
to 8.8.8.8 and the response will be returned. Each query should also show up in the log which is
|
response will be returned. Each query should also show up in the log which is printed on standard
|
||||||
printed on standard output.
|
output.
|
||||||
|
|
||||||
Serve the (NSEC) DNSSEC-signed `example.org` on port 1053, with errors and logging sent to standard
|
To serve the (NSEC) DNSSEC-signed `example.org` on port 1053, with errors and logging sent to standard
|
||||||
output. Allow zone transfers to everybody, but specifically mention 1 IP address so that CoreDNS can
|
output. Allow zone transfers to everybody, but specifically mention 1 IP address so that CoreDNS can
|
||||||
send notifies to it.
|
send notifies to it.
|
||||||
|
|
||||||
@@ -139,6 +134,7 @@ example.org:1053 {
|
|||||||
errors
|
errors
|
||||||
log
|
log
|
||||||
}
|
}
|
||||||
|
|
||||||
. {
|
. {
|
||||||
any
|
any
|
||||||
forward . 8.8.8.8:53
|
forward . 8.8.8.8:53
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
## Description
|
## Description
|
||||||
|
|
||||||
By just using *log* you dump all queries (and parts for the reply) on standard output. Options exist
|
By just using *log* you dump all queries (and parts for the reply) on standard output. Options exist
|
||||||
to tweak the output a little. The date/time prefix on log lines is RFC3339 formatted with
|
to tweak the output a little. Note that for busy servers logging will incur a performance hit.
|
||||||
milliseconds.
|
|
||||||
|
|
||||||
Note that for busy servers logging will incur a performance hit.
|
Enabling or disabling the *log* plugin only affects the query logging, any other logging from
|
||||||
|
CoreDNS will show up regardless.
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
||||||
@@ -18,8 +18,7 @@ Note that for busy servers logging will incur a performance hit.
|
|||||||
log
|
log
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* With no arguments, a query log entry is written to *stdout* in the common log format for all requests
|
With no arguments, a query log entry is written to *stdout* in the common log format for all requests.
|
||||||
|
|
||||||
Or if you want/need slightly more control:
|
Or if you want/need slightly more control:
|
||||||
|
|
||||||
~~~ txt
|
~~~ txt
|
||||||
@@ -51,7 +50,7 @@ The classes of responses have the following meaning:
|
|||||||
* `all`: the default - nothing is specified. Using of this class means that all messages will be
|
* `all`: the default - nothing is specified. Using of this class means that all messages will be
|
||||||
logged whatever we mix together with "all".
|
logged whatever we mix together with "all".
|
||||||
|
|
||||||
If no class is specified, it defaults to *all*.
|
If no class is specified, it defaults to `all`.
|
||||||
|
|
||||||
## Log Format
|
## Log Format
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user