diff --git a/colcon_alias/logging.py b/colcon_alias/logging.py index 3f867b6..87bf09c 100644 --- a/colcon_alias/logging.py +++ b/colcon_alias/logging.py @@ -4,16 +4,10 @@ import logging from colcon_core.logging import colcon_logger - - -def _get_effective_log_level(): - for handler in colcon_logger.handlers: - if isinstance(handler, logging.StreamHandler): - return handler.level - return logging.WARNING +from colcon_core.logging import get_effective_console_level def configure_filelock_logger(): """Configure the 'filelock' log level based on colcon's log level.""" - log_level = _get_effective_log_level() + log_level = get_effective_console_level(colcon_logger) logging.getLogger('filelock').setLevel(log_level) diff --git a/setup.cfg b/setup.cfg index 7483cf0..9840eea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ keywords = colcon [options] python_requires = >=3.6 install_requires = - colcon-core + colcon-core>=0.17.0 filelock PyYAML packages = find: diff --git a/stdeb.cfg b/stdeb.cfg index bfd052e..e75f9e8 100644 --- a/stdeb.cfg +++ b/stdeb.cfg @@ -1,6 +1,6 @@ [colcon-alias] No-Python2: -Depends3: python3-colcon-core, python3-filelock, python3-yaml +Depends3: python3-colcon-core (>= 0.17.0), python3-filelock, python3-yaml Conflicts3: python3-colcon-mixin (< 0.2.2) Suite: focal jammy noble bookworm trixie X-Python3-Version: >= 3.6