-
Notifications
You must be signed in to change notification settings - Fork 290
Added Logging Handler Names & windows pytest support #812
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces structured logging with module-specific handlers throughout the Meshtastic codebase. The main purpose is to enable granular log level control for individual modules or the entire library.
- Adds named logger instances to all modules using
logging.getLogger(__name__) - Replaces direct
logging.*calls with module-specificlogger.*calls - Enables per-module log level configuration as described in the PR description
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| meshtastic/util.py | Adds module logger and converts logging calls |
| meshtastic/tunnel.py | Adds module logger and converts logging calls |
| meshtastic/test.py | Adds module logger and converts logging calls |
| meshtastic/tcp_interface.py | Adds module logger and converts logging calls |
| meshtastic/stream_interface.py | Adds module logger and converts logging calls |
| meshtastic/serial_interface.py | Adds module logger and converts logging calls |
| meshtastic/remote_hardware.py | Adds module logger and converts logging calls |
| meshtastic/node.py | Adds module logger and converts logging calls |
| meshtastic/mesh_interface.py | Adds module logger and converts logging calls |
| meshtastic/ble_interface.py | Adds module logger and converts logging calls |
| meshtastic/main.py | Adds module logger and converts logging calls |
| meshtastic/init.py | Adds module logger and converts logging calls |
|
Looks pretty reasonable to me skimming from my phone; I'll throw copilot at it for now and set off CI, and try to give it a close look when I've next got a small block of time at a proper computer just in case there's anything finicky to spot. Thanks for the PR! |
- test are now runable on windows, some are ignored and a fake termios for the decorators - test_exit_with_exception with a true exception
|
@ianmcorvidae because the test |
|
So.... i did a |
|
Windows test (used host windows) with |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #812 +/- ##
==========================================
+ Coverage 60.13% 60.15% +0.01%
==========================================
Files 24 24
Lines 4219 4241 +22
==========================================
+ Hits 2537 2551 +14
- Misses 1682 1690 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
It is now possible to set loglevels for each module or for all per:
--debuglibparameter for only meshtastic debug