commit: ab71ec960b65b2d77e5669d8979dc72e3f4ffb41 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Aug 17 06:46:53 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Aug 17 06:52:55 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab71ec96
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 <AT> gentoo.org> NEWS | 9 +++++++++ lib/_emerge/main.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/NEWS b/NEWS index d442a42ab0..ad541b95b1 100644 --- a/NEWS +++ b/NEWS @@ -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 41bed09696..d92f069901 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: