diff options
author | Sam James <sam@gentoo.org> | 2023-08-17 07:46:53 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-17 07:52:55 +0100 |
commit | ab71ec960b65b2d77e5669d8979dc72e3f4ffb41 (patch) | |
tree | eb637eafff61ad159b102064fe86dd2fd157cccc | |
parent | NEWS: add another news entry (diff) | |
download | portage-ab71ec96.tar.gz portage-ab71ec96.tar.bz2 portage-ab71ec96.zip |
lib: _emerge: call portage.util.initialize_logger()
We don't have a root logger setup otherwise which means we can't get nice
output from things like gemato which define their own logger names/domains.
And respect --debug for it.
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | lib/_emerge/main.py | 4 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,12 @@ +portage-3.0.51 (UNRELEASED) +-------------- + +Features: +* emerge: Set up logging immediately and respect --debug for log level. + +* sync: git, rsync: now respects --debug for better output from gemato. This is + especially useful for debugging hangs during the 'Refreshing keys' stage. + portage-3.0.50 (2023-08-09) -------------- diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py index 41bed0969..d92f06990 100644 --- a/lib/_emerge/main.py +++ b/lib/_emerge/main.py @@ -1191,6 +1191,10 @@ def emerge_main(args: Optional[list[str]] = None): myaction, myopts, myfiles = parse_opts(args, silent=True) if "--debug" in myopts: os.environ["PORTAGE_DEBUG"] = "1" + portage.util.initialize_logger(logging.DEBUG) + else: + portage.util.initialize_logger() + if "--config-root" in myopts: os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] if "--sysroot" in myopts: |