diff options
author | 2018-04-11 21:07:10 +0300 | |
---|---|---|
committer | 2018-04-11 19:07:10 +0100 | |
commit | 9ae9ee4b6b9bfec6a349f5f0e7db5fe7620f6462 (patch) | |
tree | 14ec9a45bd67d11f8e12e55f60ad2f8470f1e70c | |
parent | a0f294e550e9369bab711d9ae4ec79c942eeb792 (diff) | |
download | coredns-9ae9ee4b6b9bfec6a349f5f0e7db5fe7620f6462.tar.gz coredns-9ae9ee4b6b9bfec6a349f5f0e7db5fe7620f6462.tar.zst coredns-9ae9ee4b6b9bfec6a349f5f0e7db5fe7620f6462.zip |
fix readme.md of log plugin (#1668)
-rw-r--r-- | plugin/log/README.md | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/plugin/log/README.md b/plugin/log/README.md index c0c208534..65cca19c8 100644 --- a/plugin/log/README.md +++ b/plugin/log/README.md @@ -28,22 +28,23 @@ 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) -You can further specify the class of responses that get logged: +You can further specify the classes of responses that get logged: ~~~ txt log [NAME] [FORMAT] { - class [success|denial|error|all] + class CLASSES... } ~~~ -Here `success` `denial` and `error` denotes the class of responses that should be logged. The -classes have the following meaning: +* `CLASSES` is a space-separated list of classes of responses that should be logged + +The classes of responses have the following meaning: * `success`: successful response * `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. +* `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*. @@ -106,3 +107,34 @@ Only log denials for example.org (and below to a file) } } ~~~ + +Log all queries which were not resolved successfully + +~~~ corefile +. { + log . { + class denial error + } +} +~~~ + +Log all queries on which we did not get errors + +~~~ corefile +. { + log . { + class denial success + } +} +~~~ + +Also the multiple statements can be OR-ed, for example, we can rewrite the above case as following: + +~~~ corefile +. { + log . { + class denial + class success + } +} +~~~ |