Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colcon_core.logging.get_effective_console_level function #650

Merged
merged 2 commits into from
May 31, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented May 24, 2024

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.

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, 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.
@cottsay cottsay added the enhancement New feature or request label May 24, 2024
@cottsay cottsay self-assigned this May 24, 2024
Copy link

codecov bot commented May 24, 2024

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 ⚠️
Additional details and impacted files
@@           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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This library is directly used by colcon and the debug messages may be
useful when debugging colcon itself.
Copy link
Contributor

@claraberendsen claraberendsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cottsay cottsay merged commit 86eb33b into master May 31, 2024
36 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cottsay/effective-log-level branch May 31, 2024 17:16
@cottsay cottsay added this to the 0.16.2 milestone Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants