]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: move verbose() to logging section
authorPetr Špaček <petr.spacek@nic.cz>
Mon, 6 Jan 2020 14:18:27 +0000 (15:18 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 15 Jan 2020 09:38:16 +0000 (10:38 +0100)
daemon/README.rst
doc/config.rst

index de29f9d188b543e85314e81de5811a94c2aef3f8..a3f0e1ced88f0e913389d6a360672aceac119853 100644 (file)
@@ -3,9 +3,36 @@
 TODO: Environment
 =================
 
-.. function:: verbose(true | false)
+.. function:: user(name, [group])
+
+   :param string name: user name
+   :param string group: group name (optional)
+   :return: boolean
+
+   Drop privileges and start running as given user (and group, if provided).
+
+   .. tip:: Note that you should bind to required network addresses before changing user. At the same time, you should open the cache **AFTER** you change the user (so it remains accessible). A good practice is to divide configuration in two parts:
+
+      .. code-block:: lua
+
+         -- privileged
+         net.listen('127.0.0.1')
+         net.listen('::1')
+         user('knot-resolver', 'netgrp')
+         -- unprivileged
+         cache.size = 100*MB
+
+   Example output:
+
+   .. code-block:: lua
+
+      > user('baduser')
+      invalid user name
+      > user('knot-resolver', 'netgrp')
+      true
+      > user('root')
+      Operation not permitted
 
-   :return: Toggle verbose logging.
 
 .. function:: mode('strict' | 'normal' | 'permissive')
 
@@ -29,6 +56,7 @@ TODO: Environment
         Unacceptable or missing glue records trigger resolution of names listed
         in NS records before following respective delegation.
 
+
 .. function:: reorder_RR([true | false])
 
    :param boolean value: New value for the option *(optional)*
@@ -37,36 +65,6 @@ TODO: Environment
    If set, resolver will vary the order of resource records within RR-sets.
    It is disabled by default.
 
-.. function:: user(name, [group])
-
-   :param string name: user name
-   :param string group: group name (optional)
-   :return: boolean
-
-   Drop privileges and run as given user (and group, if provided).
-
-   .. tip:: Note that you should bind to required network addresses before changing user. At the same time, you should open the cache **AFTER** you change the user (so it remains accessible). A good practice is to divide configuration in two parts:
-
-      .. code-block:: lua
-
-         -- privileged
-         net = { '127.0.0.1', '::1' }
-         -- unprivileged
-         cache.size = 100*MB
-         trust_anchors.add_file('root.key')
-
-   Example output:
-
-   .. code-block:: lua
-
-      > user('baduser')
-      invalid user name
-      > user('knot-resolver', 'netgrp')
-      true
-      > user('root')
-      Operation not permitted
-
-
 
 .. _`JSON-encoded`: http://json.org/example
 .. _`Learn Lua in 15 minutes`: http://tylerneylon.com/a/learn-lua/
index 3ee0dd564f3d36715583e2a40fc6d1283fb51af0..8a48d17f6bebf51a6078cf367d4356bf5e8a4e15 100644 (file)
@@ -124,14 +124,33 @@ individual services for classic DNS, DoT and DoH from each other.
        panic("Use kresd@dns*, kresd@tls* or kresd@doh* instance names")
    end
 
-.. include:: ../daemon/README.rst
-.. include:: ../daemon/bindings/modules.rst
+Logging, monitoring, diagnostics
+================================
+Knot Resolver logs to standard outputs, which is then captured by supervisor
+and sent to logging system for further processing.
+To read logs use commands usual for your distribution.
+E.g. on distributions using systemd-journald use command ``journalctl -u kresd@* -f``.
+
+During normal operation only errors and other very important events are logged,
+so by default logs from Knot Resolver should contain only couple lines a day.
+For debugging purposes it is possible to enable very verbose logging using
+:func:`verbose` function.
+
+.. function:: verbose([true | false])
+
+   :param: ``true`` to enable, ``false`` to disable verbose logging.
+   :return: boolean Current state of verbose logging.
+
+   Toggle global verbose logging. Use only for debugging purposes.
+   On busy systems vebose logging can produce several MB of logs per
+   second and will slow down operation.
+
+More fine-grained tools are available in following modules:
 
-Monitoring and diagnostics
-==========================
 .. contents::
    :depth: 1
    :local:
+
 .. include:: ../modules/nsid/README.rst
 .. include:: ../modules/graphite/README.rst
 .. include:: ../modules/dnstap/README.rst