colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
103 stars 46 forks source link

Add colcon_core.logging.get_effective_console_level function #650

Closed cottsay closed 4 months ago

cottsay commented 4 months ago

When colcon routes log messages to log files at a different level from the console, it makes it a little more convoluted to determine what log level is actually set.

When we're utilizing non-colcon libraries that also use python's logging module (e.x. ros_buildfarm, rosdistro, etc), we'll typically want to "synchronize" colcon's configured log level with the other library. This function can be used to determine what level colcon's console logging is set to.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 87.50000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.24%. Comparing base (db84706) to head (0513457).

Files Patch % Lines
colcon_core/logging.py 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #650 +/- ## ======================================= Coverage 83.23% 83.24% ======================================= Files 66 66 Lines 3842 3849 +7 Branches 758 760 +2 ======================================= + Hits 3198 3204 +6 Misses 556 556 - Partials 88 89 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.