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

Fix: Global Logging #172

Merged
merged 5 commits into from
Feb 7, 2025
Merged

Fix: Global Logging #172

merged 5 commits into from
Feb 7, 2025

Conversation

dominik737
Copy link
Contributor

Purpose

Previous setup of the logging module led to duplicit logs when using the Python logging module along the depthai-nodes package as a dependency.

Specification

To get the package logger use the get_logger method from depthai_nodes.utils.

Dependencies & Potential Impact

All the files and classes that were using the logger were changed to use the package logger.

Testing & Validation

Was tested on simple script, where a custom logger was configured and log message from depthai-nodes was triggered. The logs were not duplicated by depthai-nodes logger. The logs from depthai-nodes were successfully logged.

@github-actions github-actions bot added messages Changes affecting ml.messages fix Fixing a bug labels Feb 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 38.60%. Comparing base (e9a92f4) to head (81d2c78).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
depthai_nodes/ml/messages/keypoints.py 40.00% 3 Missing ⚠️
depthai_nodes/ml/messages/img_detections.py 66.66% 1 Missing ⚠️
depthai_nodes/utils/logging.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           main     #172       +/-   ##
=========================================
+ Coverage      0   38.60%   +38.60%     
=========================================
  Files         0       78       +78     
  Lines         0     4269     +4269     
=========================================
+ Hits          0     1648     +1648     
- Misses        0     2621     +2621     

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

Copy link
Collaborator

@klemen1999 klemen1999 left a comment

Choose a reason for hiding this comment

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

Generally LGTM

@klemen1999 klemen1999 merged commit f4dc2e0 into main Feb 7, 2025
11 checks passed
@klemen1999 klemen1999 deleted the fix/global-logging branch February 7, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixing a bug messages Changes affecting ml.messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants