From d405caae87970eb441ea7bb5ff931aaaa3da4bdc Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 17 Apr 2023 13:31:25 +0200 Subject: [PATCH] kbase: debuglogs: Add a 'TL;DR' section for enabling logging in most common case The document grew a bit too much explaining all the mistakes we've seen the users do when configuring logging. Add a section distilling the configuration of the most basic scenario which we can refer to when upstream issues are reported. The scenario is for a runtime setting of logging into a file applied to the 'virtqemud' daemon. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- docs/kbase/debuglogs.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index 53d70ee748..811ccf0102 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -16,6 +16,22 @@ server side that matters as nearly all interesting work takes place there. Moreover, libvirt catches stderr of all running domains. These can be useful as well. +TL;DR - Enable debug logs for most common scenario +=================================================== + +This applies to the most common scenario of ``system`` instance of +``virtqemud``. Log setting is not persisted, so a restart of ``virtqemud`` or +the system clears this setting:: + + # virt-admin -c virtqemud:///system daemon-log-outputs "3:journald 1:file:/var/log/libvirt/libvirtd.log" + # virt-admin -c virtqemud:///system daemon-log-filters "3:remote 4:event 3:util.json 3:util.object 3:util.dbus 3:util.netlink 3:node_device 3:rpc 3:access 1:*" + + # # optionally disable timeout of the daemon + # virt-admin -c virtqemud:///system daemon-timeout 0 + +For any other configuration please read the rest of the document. If you want +to persist the log level and log outputs settings edit +``/etc/libvirt/virtqemud.conf`` and look for ``log-filters`` and ``log-outputs`` Logging settings in libvirt ===========================