diff options
author | 2019-01-04 19:39:02 +0000 | |
---|---|---|
committer | 2019-01-04 19:39:02 +0000 | |
commit | 300506ee912db916423ba30f0dad5d59058ae308 (patch) | |
tree | 0969dfe94a560155b9adcb8ccd8f3071e9ce31a9 /plugin | |
parent | 5e4faf9bb5db8218ac5a3f4f11f75abbbd91f7e8 (diff) | |
download | coredns-300506ee912db916423ba30f0dad5d59058ae308.tar.gz coredns-300506ee912db916423ba30f0dad5d59058ae308.tar.zst coredns-300506ee912db916423ba30f0dad5d59058ae308.zip |
plugin/log: detail {combined} and {common} (#2422)
These can be used (and are handy), document them.
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/log/README.md | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugin/log/README.md b/plugin/log/README.md index f2d89741c..21b24fff5 100644 --- a/plugin/log/README.md +++ b/plugin/log/README.md @@ -27,7 +27,9 @@ log [NAME] [FORMAT] ~~~ * `NAME` is the name to match in order to be logged -* `FORMAT` is the log format to use (default is Common Log Format) +* `FORMAT` is the log format to use (default is Common Log Format), `{common}` is used as a shortcut + for the Common Log Format. You can also use `{combined}` for a format that adds the query opcode + `{>opcode}` to the Common Log Format. You can further specify the classes of responses that get logged: @@ -45,7 +47,8 @@ The classes of responses have the following meaning: * `denial`: either NXDOMAIN or NODATA (name exists, type does not) * `error`: SERVFAIL, NOTIMP, REFUSED, etc. Anything that indicates the remote server is not willing to resolve the request. -* `all`: the default - nothing is specified. Using of this class means that all messages will be logged whatever we mix together with "all". +* `all`: the default - nothing is specified. Using of this class means that all messages will be + logged whatever we mix together with "all". If no class is specified, it defaults to *all*. @@ -75,8 +78,8 @@ The following place holders are supported: * `{>opcode}`: query OPCODE * `{/[LABEL]}`: any metadata label is accepted as a place holder if it is enclosed between `{/` and `}`. the place holder will be replaced by the corresponding metadata value or the default value `-` if label is not defined. - - +* `{common}`: the default Common Log Format. +* `{combined}`: the Common Log Format with the query opcode. The default Common Log Format is: @@ -119,11 +122,11 @@ Only log denials for example.org (and below to a file) } ~~~ -Log all queries which were not resolved successfully +Log all queries which were not resolved successfully in the Combined Log Format. ~~~ corefile . { - log . { + log . {combined} { class denial error } } |