Outline what the given settings influence.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/kbase/debuglogs.rst | 67 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst
index cba57e020d..9ba39b9f85 100644
--- a/docs/kbase/debuglogs.rst
+++ b/docs/kbase/debuglogs.rst
@@ -17,6 +17,73 @@ Moreover, libvirt catches stderr of all running domains. These can be
useful as
well.
+Logging settings in libvirt
+===========================
+
+Log levels
+----------
+
+Libvirt produces log entries in 4 priority levels; higher priority level meaning
+more severe log entries, which in turn means less of them. The log level are
+used by `Log outputs`_ and `Log filters`_ below):
+
+ * ``1: DEBUG``
+ * ``2: INFO``
+ * ``3: WARNING``
+ * ``4: ERROR``
+
+For debugging it's necessary to capture ``DEBUG`` level entries as the name
+implies.
+
+Log outputs
+-----------
+
+Log outputs describe where the log messages are being recorded. The outputs
+are described by a space-separated list of tuples in the following format:
+
+::
+
+ level:output
+
+``level`` refers to the minimum priority level of entries recorded in the output.
+
+``output`` is one of the following:
+
+ ``file:FILENAME``
+ Logging messages are appended to FILENAME.
+
+ ``journald``
+ Logging goes to the ``journald`` logging daemon.
+
+ ``stderr``
+ Logging goes to the standard error output stream of the libvirt daemon.
+
+ ``syslog:name``
+ Logging goes to syslogd. ``name`` is used to identify the entries.
+
+The default output on systems running ``journald`` is ``3:journald``. Note that
+``journald`` can trottle the amount of logs per process so for capturing debug
+logs of libvirt daemons a file output should be used in addition to the output
+to the logging daemon e.g.:
+
+::
+
+ "1:file:/var/log/libvirt/libvirtd.log 3:journald"
+
+
+Log filters
+-----------
+
+Log filters allow to avoid logging of messages which are not relevant to the
+cause. The log filters is a space-separated list of tuples in the format
+``level:identifer`` and limits messages which match ``identifier`` to the
+configured log level. Identifier supports globbing patterns such as ``*``.
+
+As ``identifier`` is based on internal naming of modules, the best approach is
+to select one of `Example filter settings`_. It's also always better to have
+more information than lack something important.
+
+
How to turn on debug logs for libvirt
=====================================
--
2.34.1