From nobody Sun Feb 8 17:22:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642434166; cv=none; d=zohomail.com; s=zohoarc; b=Y92A0+VomVKc6BlpKCUYyx44936Yu9ygTwCZkyZMULjGpRnTfUSt1AfVktTzheN+S265HnaqccfE04D6HMgJWQTHEnFUr2CtQnoTLo1JKpQTGSD2i2+mUYXbfPBmuir5qSQIyAOy4DcCvFesomMvDp/uGPi7pDaZFK2TyNzjpKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434166; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0zsTXYfnr0SzBr8eTwNSXyzAS/Gn5/P4Sx1UnPtDuJA=; b=gz26fe0cOS3mO/8fK5tcWWRwV7h+KYTfwGzpgj4GEdi6yQCMKlaVNdt9BmYb2fs6m7dUoZTC9P8NqFvX70QWnxBL1+eBjFXsTD/3NklsCQEIvFDmTOB1TwDHsQNi0MhAveZ7Fgys60cSKf8Dn2dfNfJx4zfHNxx52Z+7+DUW1/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642434166385422.4076752639869; Mon, 17 Jan 2022 07:42:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-wbl46dt_PH2_9NxaXJ-FLg-1; Mon, 17 Jan 2022 10:42:36 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9AFEC10151EC; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79DC5798CA; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 431F31806D2C; Mon, 17 Jan 2022 15:41:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFdWY7000494 for ; Mon, 17 Jan 2022 10:39:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id BC4515B920; Mon, 17 Jan 2022 15:39:32 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B8875444C for ; Mon, 17 Jan 2022 15:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434165; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0zsTXYfnr0SzBr8eTwNSXyzAS/Gn5/P4Sx1UnPtDuJA=; b=AgjwnnkMIdmIzpSxeBU+JiZQkNSQl2/ob/L5wIldnPnaDCo7uS90iNC445UFX3lU7auxZi pnNR765RqvinD8K4WSs8lwrjRgBtov+liWHAdnyHLJtRRkXa8PuDrCe2SlJoKOvXkGh+fq IsmP+8tEehNOxGpKjG082quegkoHyoE= X-MC-Unique: wbl46dt_PH2_9NxaXJ-FLg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/8] kbase: debuglogs: Section off the settings for legacy libvirt Date: Mon, 17 Jan 2022 16:39:12 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642434167559100001 Content-Type: text/plain; charset="utf-8" Move out the settings required to pre libvirt-4.4.0 deployments into a separate section so that the main point is not cluttered by now mostly irrelevant settings. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- docs/kbase/debuglogs.rst | 48 +++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index e0115bd23f..cba57e020d 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -33,14 +33,6 @@ URI `__. For ``qemu:///sys= tem``: :: - # LEGACY SETTINGS PRIOR LIBVIRT 4.4.0 SEE BELOW! # - log_level =3D 1 - log_filters=3D"1:qemu 3:remote 4:event 3:util.json 3:rpc" - log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" - -:: - - # PREFERRED SETTINGS AFTER LIBVIRT 4.4.0 # log_filters=3D"3:remote 4:event 3:util.json 3:rpc 1:*" log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" @@ -51,12 +43,10 @@ URI `__. For ``qemu:///sy= stem``: systemctl restart libvirtd.service -In the config variables above, we have set logging level to 1 (debug level= ), set -some filters (to filter out noise), e.g. from rpc only warnings (=3Dlevel = 3) and -above will be reported. The logs are saved into -``/var/log/libvirt/libvirtd.log``. Since libvirt **4.4.0** log filters sup= port -shell globbing, therefore the usage of ``log_level`` is considered depreca= ted in -favour of pure usage of ``log_filters``. + +*Note:* Libvirt prior to the ``libvirt-4.4.0`` release didn't support glob= bing +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: @@ -91,12 +81,6 @@ own set of filters: :: - ## LEGACY APPROACH ENUMERATING ALL THE DESIRED MODULES ## - # virt-admin daemon-log-filters "1:util 1:libvirt 1:storage 1:network 1= :nodedev 1:qemu" - -:: - - ## CURRENT APPROACH USING SHELL GLOBBING ## # virt-admin daemon-log-filters "3:remote 4:util.json 4:rpc 1:*" Analogically, the same procedure can be performed with log outputs: @@ -193,3 +177,27 @@ This filter logs only QMP traffic and skips most of li= bvirt's messages. :: 2:qemu.qemu_monitor 3:* + + +Legacy (pre-4.4.0) libvirt daemon logging configuration +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +Old libvirt versions didn't support globbing (e.g. ``1:*``) to configure l= ogging +wildcarts, thus it's required to explicitly set logging level to 1 (debug = level) +via the ``log_level`` setting and then filter out the noise via targetted = log +filters. + +:: + + # LEGACY SETTINGS PRIOR LIBVIRT 4.4.0 + log_level =3D 1 + log_filters=3D"1:qemu 3:remote 4:event 3:util.json 3:rpc" + log_outputs=3D"1:file:/var/log/libvirt/libvirtd.log" + + +Or using ``virt-admin``: + +:: + + ## LEGACY APPROACH ENUMERATING ALL THE DESIRED MODULES ## + # virt-admin daemon-log-filters "1:util 1:libvirt 1:storage 1:network 1= :nodedev 1:qemu" --=20 2.34.1