Resolves #771 header should be a log and not a print#772
Open
mwc360 wants to merge 3 commits intomicrosoft:mainfrom
Open
Resolves #771 header should be a log and not a print#772mwc360 wants to merge 3 commits intomicrosoft:mainfrom
mwc360 wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR converts the print_header function to log_header to provide better control over logging output by allowing downstream libraries to manage log levels. The change replaces direct print statements with logger.info calls and adds a logger parameter to the function signature.
Changes:
- Renamed
print_headertolog_headerand added a requiredloggerparameter to the function signature - Updated the function implementation to use
logger.info()instead ofprint()statements - Updated most call sites in
publish.pyandfabric_workspace.pyto pass the logger parameter
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/fabric_cicd/_common/_logging.py | Refactored print_header to log_header, adding logger parameter and replacing print statements with logger.info calls |
| src/fabric_cicd/publish.py | Updated import and most function calls to use log_header with logger parameter |
| src/fabric_cicd/fabric_workspace.py | Updated import and all function calls to use log_header with logger parameter |
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.
Description
Moves header print to info log so that downstream libraries can control the outputs easier (i.e. silencing info and warning logs)