-
Notifications
You must be signed in to change notification settings - Fork 255
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
base: master
Are you sure you want to change the base?
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 |
It is now possible to set loglevels for each module or for all per: