From ef79b04cf6bd44d48cdc1812f50436bfa3f32eae Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 29 Jan 2024 17:46:30 +0100 Subject: [PATCH] python:gp: Fix logging with gp This allows enable INFO level logging with: `samba-gpupdate -d3` BUG: https://bugzilla.samba.org/show_bug.cgi?id=15558 Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton Reviewed-by: Andrew Bartlett (cherry picked from commit 145194071b10c4c1857f28fe79c57fd63ffab889) --- python/samba/gp/util/logging.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/samba/gp/util/logging.py b/python/samba/gp/util/logging.py index a74a8707d50..c3de32825db 100644 --- a/python/samba/gp/util/logging.py +++ b/python/samba/gp/util/logging.py @@ -24,9 +24,10 @@ import gettext import random import sys -logger = logging.getLogger() +logger = logging.getLogger("gp") + + def logger_init(name, log_level): - logger = logging.getLogger(name) logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.CRITICAL) if log_level == 1: -- 2.43.0