From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BD22F158094 for ; Sat, 9 Jul 2022 01:49:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01B47E0974; Sat, 9 Jul 2022 01:49:11 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 82B9DE0971 for ; Sat, 9 Jul 2022 01:49:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1446340E6D for ; Sat, 9 Jul 2022 01:49:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 682C44EC for ; Sat, 9 Jul 2022 01:49:09 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1657329979.635e0b9f8b96217070eb48a6888ac5e1c46f8822.floppym@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/revdep_rebuild/rebuild.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 635e0b9f8b96217070eb48a6888ac5e1c46f8822 X-VCS-Branch: master Date: Sat, 9 Jul 2022 01:49:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8a04285c-738e-47e6-93fa-67dffb433d88 X-Archives-Hash: 503afee2cc07d3ef2e3a0f658412c0b0 commit: 635e0b9f8b96217070eb48a6888ac5e1c46f8822 Author: Mike Gilbert gentoo org> AuthorDate: Sat Jul 9 01:26:19 2022 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Jul 9 01:26:19 2022 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=635e0b9f revdep-rebuild: set up a child logger with propagate = False This prevents log messages from being emitted more than once, especially by the root level loggger. Bug: https://bugs.gentoo.org/838406 Signed-off-by: Mike Gilbert gentoo.org> pym/gentoolkit/revdep_rebuild/rebuild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index 75e209d..16d07b8 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -44,7 +44,8 @@ __productname__ = "revdep-ng" def init_logger(settings): """Creates and iitializes our logger according to the settings""" - logger = logging.getLogger() + logger = logging.getLogger(__name__) + logger.propagate = False log_handler = logging.StreamHandler(sys.stdout) log_fmt = logging.Formatter("%(msg)s") log_handler.setFormatter(log_fmt)