]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:gp: Fix logging with gp
authorAndreas Schneider <asn@samba.org>
Mon, 29 Jan 2024 16:46:30 +0000 (17:46 +0100)
committerJule Anger <janger@samba.org>
Mon, 5 Feb 2024 12:58:13 +0000 (12:58 +0000)
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 <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 145194071b10c4c1857f28fe79c57fd63ffab889)

python/samba/gp/util/logging.py

index 9e70891b62c0fb43cc9bb590b5735fa0f68e36e7..da085d8d7e6d5a879cf4d7d8bc306d7a39529d80 100644 (file)
@@ -23,9 +23,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: