[PATCH 6/8] kbase: debuglogs: Extract client library logging setup

Peter Krempa posted 8 patches 4 years ago
There is a newer version of this series
[PATCH 6/8] kbase: debuglogs: Extract client library logging setup
Posted by Peter Krempa 4 years ago
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 docs/kbase/debuglogs.rst | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst
index 9ba39b9f85..f353cf7de5 100644
--- a/docs/kbase/debuglogs.rst
+++ b/docs/kbase/debuglogs.rst
@@ -84,7 +84,7 @@ 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
+Libvirt daemons logging configuration
 =====================================

 Persistent setting
@@ -115,14 +115,6 @@ URI <https://libvirt.org/uri.html>`__. For ``qemu:///system``:
 patterns and thus requires more configuration. See
 `Legacy (pre-4.4.0) libvirt daemon logging configuration`_.

-In case you want to get the client logs, you need to set this environment
-variable:
-
-::
-
-   export LIBVIRT_LOG_OUTPUTS="1:file:/tmp/libvirt_client.log"
-
-
 However, when you are using the session mode ``qemu:///session`` or you run the
 ``libvirtd`` as unprivileged user you will find configuration file under
 ``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``.
@@ -186,6 +178,23 @@ setting which depends on the host configuration, *journald* in our case:
    # virt-admin daemon-log-outputs ""
     Logging outputs: 2:journald

+
+Client library logging
+======================
+
+By default the client library doesn't produce any logs and usually it's not
+needed as in most scenarios the client library doesn't do anything interesting.
+
+In case you want to get the client logs, logging is controlled via
+environment variables ``LIBVIRT_LOG_OUTPUTS`` and ``LIBVIRT_LOG_FILTERS``.
+Generally when client logs are needed don't filter them:
+
+::
+
+   export LIBVIRT_LOG_OUTPUTS="1:file:/tmp/libvirt_client.log"
+
+
+
 What to attach?
 ===============

-- 
2.34.1

Re: [PATCH 6/8] kbase: debuglogs: Extract client library logging setup
Posted by Erik Skultety 4 years ago
On Mon, Jan 17, 2022 at 04:39:14PM +0100, Peter Krempa wrote:
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  docs/kbase/debuglogs.rst | 27 ++++++++++++++++++---------
>  1 file changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst
> index 9ba39b9f85..f353cf7de5 100644
> --- a/docs/kbase/debuglogs.rst
> +++ b/docs/kbase/debuglogs.rst
> @@ -84,7 +84,7 @@ 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
> +Libvirt daemons logging configuration
>  =====================================
> 
>  Persistent setting
> @@ -115,14 +115,6 @@ URI <https://libvirt.org/uri.html>`__. For ``qemu:///system``:
>  patterns and thus requires more configuration. See
>  `Legacy (pre-4.4.0) libvirt daemon logging configuration`_.
> 
> -In case you want to get the client logs, you need to set this environment
> -variable:
> -
> -::
> -
> -   export LIBVIRT_LOG_OUTPUTS="1:file:/tmp/libvirt_client.log"
> -
> -
>  However, when you are using the session mode ``qemu:///session`` or you run the
>  ``libvirtd`` as unprivileged user you will find configuration file under
>  ``$XDG_CONFIG_HOME/libvirt/libvirtd.conf``.
> @@ -186,6 +178,23 @@ setting which depends on the host configuration, *journald* in our case:
>     # virt-admin daemon-log-outputs ""
>      Logging outputs: 2:journald
> 
> +
> +Client library logging
> +======================
> +
> +By default the client library doesn't produce any logs and usually it's not
> +needed as in most scenarios the client library doesn't do anything interesting.

maybe better worded as:
"usually it's not very interesting on its own anyway."

> +
> +In case you want to get the client logs, logging is controlled via
> +environment variables ``LIBVIRT_LOG_OUTPUTS`` and ``LIBVIRT_LOG_FILTERS``.

'via the ``LIBVIRT_LOG_OUTPUTS`` and ``LIBVIRT_LOG_FILTERS`` environment
variables.'

> +Generally when client logs are needed don't filter them:

s/needed don't/needed make sure you don't/


Reviewed-by: Erik Skultety <eskultet@redhat.com>
> +
> +::
> +
> +   export LIBVIRT_LOG_OUTPUTS="1:file:/tmp/libvirt_client.log"
> +
> +
> +
>  What to attach?
>  ===============
> 
> -- 
> 2.34.1
>