Color coded log messages - #439
Merged
Merged
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces color-coded console log output for logging configured via load_configuration_from_env, aiming to make severity levels easier to visually scan during development.
Changes:
- Adds a
ColorFormatterto apply ANSI colors based on log severity. - Switches the configured
StreamHandlerto use the new formatter. - Disables logger propagation during env-driven logging configuration to reduce duplicated outputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rodrigo Brandão (rodrigobr-msft)
approved these changes
Jul 6, 2026
Kyle Rohn (kylerohn-msft)
force-pushed
the
users/kylerohn/colorful-logging
branch
from
July 7, 2026 18:01
b76f4d1 to
65d9bfa
Compare
Kyle Rohn (kylerohn-msft)
enabled auto-merge (squash)
July 7, 2026 18:02
Comment on lines
88
to
92
|
|
||
| logger.propagate = False # Prevent log messages from being propagated | ||
| logger.handlers.clear() # Remove existing handlers to prevent duplicates | ||
| logger.addHandler(console_handler) | ||
| logger.setLevel(level) |
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.
This feature adds color coded logging to the logger initialized by
load_configuration_from_env. See the image below to see the color coding:Closes: #438