From nobody Sun Feb 8 17:47:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1642434120; cv=none; d=zohomail.com; s=zohoarc; b=IFrGbdIZOs4E7KGG8ehF6YwFiKj36hdhLmwI9kf12cTVmgfNld+SVegFaDorI99aTgSNDrpNUSeWZ2QmlOPJhAtU6kLi1jSTMjsQBJBg2j7s7quwu0+02nNxOpqV4uDYH3NfcbY0Sz7X3mqner6fgMC4JvfoDt3298+bW2TMriw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642434120; 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=46ZvTEWoOofenF6+Cq8Ye6pq3lCQzc+DloWrafvhzVk=; b=QRuSy0kPhczno8wDXr/w0rs7oYDAc85WZONAqX/Ag65lBdG+amsXPkEQNMykH7LNCxOA7jt1bdT7ShR9MO0H2bKlDJ5y5s2cYfiMY1BpNkg56YWFrcZlkhZahTA/LVd35Ek8NglEcj7h5MBBICZDc45k5KckHeJFU5QUZU4qn40= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1642434120892127.1028297602495; Mon, 17 Jan 2022 07:42:00 -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-150-BZKMJ58nNceSn_doKH-vDA-1; Mon, 17 Jan 2022 10:40:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E9F0100DFC1; Mon, 17 Jan 2022 15:39:38 +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 2C1BD7E91A; Mon, 17 Jan 2022 15:39:38 +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 DE5A41806D1C; Mon, 17 Jan 2022 15:39:37 +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 20HFdYST000528 for ; Mon, 17 Jan 2022 10:39:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id D19C95B920; Mon, 17 Jan 2022 15:39:34 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D6D05444C for ; Mon, 17 Jan 2022 15:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642434119; 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=46ZvTEWoOofenF6+Cq8Ye6pq3lCQzc+DloWrafvhzVk=; b=hwRhvhNvePiQ6IhZDXGbgormJTZwzg6VwkN5LQKReCpISEx4a8c1NzPQ2aSI1tB+Seiah0 cul41+t9TourxUG2sqn/7XmngXVUmm0joRPt797Zn6Fs9v6AowneNKQxNcqCUuI2GceEUq I8ORKmDKz7DMP2rkjYgGUA95smk5wMk= X-MC-Unique: BZKMJ58nNceSn_doKH-vDA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 6/8] kbase: debuglogs: Extract client library logging setup Date: Mon, 17 Jan 2022 16:39:14 +0100 Message-Id: <43aa0447917effc21bd6c503ee310c8a2ae78c58.1642433476.git.pkrempa@redhat.com> 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.12 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: 1642434121372100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- 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 al= ways better to have more information than lack something important. -How to turn on debug logs for libvirt +Libvirt daemons 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 Persistent setting @@ -115,14 +115,6 @@ URI `__. For ``qemu:///s= ystem``: 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=3D"1:file:/tmp/libvirt_client.log" - - However, when you are using the session mode ``qemu:///session`` or you ru= n 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, *jour= nald* in our case: # virt-admin daemon-log-outputs "" Logging outputs: 2:journald + +Client library logging +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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 interes= ting. + +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=3D"1:file:/tmp/libvirt_client.log" + + + What to attach? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.34.1