Add --log-level CLI flag for debug logging#20
Closed
mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
Closed
Add --log-level CLI flag for debug logging#20mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
mac-agent wants to merge 1 commit intoBortlesboat:mainfrom
Conversation
- Moved logging.basicConfig from module level into main() - Added --log-level argument (DEBUG/INFO/WARNING/ERROR, default INFO) - Added tests verifying the flag is accepted and invalid values rejected Fixes Bortlesboat#12
Owner
|
Closing this as superseded by #31, which consolidates the open backlog work into one maintainer sweep. Thank you for the contribution and the concrete issue coverage here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12
This PR adds a
--log-levelCLI flag to control logging verbosity, and moves the module-levellogging.basicConfigcall intomain()so it respects the flag.Changes
Removed module-level
logging.basicConfigfrom line 23 — logging is now configured inmain()after argument parsing.Added
--log-levelargument to argparse with choices: DEBUG, INFO, WARNING, ERROR (default: INFO).Added tests:
test_log_level_accepted— verifies all valid levels are acceptedtest_invalid_log_level_rejected— verifies invalid values are rejectedUsage
Acceptance Criteria
bitcoin-mcp --log-level DEBUGproduces debug output on stderrbitcoin-mcpwith no flag defaults to INFO (no breaking change)bitcoin-mcp --log-level WARNINGsuppresses info messageslogging.basicConfigremoved