Skip to content

Resolves #771 header should be a log and not a print#772

Open
mwc360 wants to merge 3 commits intomicrosoft:mainfrom
mwc360:users/mcole/improve_header_logging
Open

Resolves #771 header should be a log and not a print#772
mwc360 wants to merge 3 commits intomicrosoft:mainfrom
mwc360:users/mcole/improve_header_logging

Conversation

@mwc360
Copy link
Contributor

@mwc360 mwc360 commented Jan 30, 2026

Description

Moves header print to info log so that downstream libraries can control the outputs easier (i.e. silencing info and warning logs)

image

Copilot AI review requested due to automatic review settings January 30, 2026 16:32
@mwc360 mwc360 requested a review from a team as a code owner January 30, 2026 16:32
Copy link
Contributor

Copilot AI left a 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 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_header to log_header and added a required logger parameter to the function signature
  • Updated the function implementation to use logger.info() instead of print() statements
  • Updated most call sites in publish.py and fabric_workspace.py to 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant