fix logger no longer applying to clan_lib
with moving code to clan_lib we are missing logging for some output. To fix this we remove the module scoping from the logger and just set one global logger.
This commit is contained in:
@@ -23,11 +23,9 @@ class ClanAppOptions:
|
||||
@profile
|
||||
def app_run(app_opts: ClanAppOptions) -> int:
|
||||
if app_opts.debug:
|
||||
setup_logging(logging.DEBUG, root_log_name=__name__.split(".")[0])
|
||||
setup_logging(logging.DEBUG, root_log_name="clan_cli")
|
||||
setup_logging(logging.DEBUG)
|
||||
else:
|
||||
setup_logging(logging.INFO, root_log_name=__name__.split(".")[0])
|
||||
setup_logging(logging.INFO, root_log_name="clan_cli")
|
||||
setup_logging(logging.INFO)
|
||||
|
||||
log.debug("Debug mode enabled")
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
@@ -22,7 +23,7 @@ def pytest_sessionstart(session: pytest.Session) -> None:
|
||||
# You can access the session config, items, testsfailed, etc.
|
||||
print(f"Session config: {session.config}")
|
||||
|
||||
setup_logging(level="DEBUG")
|
||||
setup_logging(logging.DEBUG)
|
||||
|
||||
|
||||
# fixture for git_repo
|
||||
|
||||
Reference in New Issue
Block a user