Python: fix for logging setup#2371
Merged
eavanvalkenburg merged 3 commits intomicrosoft:mainfrom Nov 25, 2025
Merged
Conversation
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes logging setup by moving the logging.basicConfig() call from module-level execution to a dedicated setup_logging() function, giving users explicit control over when logging is configured.
Key Changes:
- Introduced
setup_logging()function inagent_framework._loggingto encapsulate logging configuration - Updated the observability sample to demonstrate the new logging setup pattern
- Added documentation explaining the opinionated logging format and how to use
setup_logging()
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
python/packages/core/agent_framework/_logging.py |
Moved logging.basicConfig() from module level into a new setup_logging() function and exported it via __all__ |
python/samples/getting_started/observability/setup_observability_with_parameters.py |
Added import and call to setup_logging() to demonstrate the new logging configuration pattern |
python/samples/getting_started/observability/README.md |
Added documentation sections explaining the setup_logging() function and updated sample description to reference logging setup |
dmytrostruk
approved these changes
Nov 21, 2025
moonbox3
approved these changes
Nov 24, 2025
f642151 to
b32521b
Compare
moonbox3
approved these changes
Nov 25, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* fix for logging setup * typo fixes * fix text
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.
Motivation and Context
Closes: #2242
Description
Contribution Checklist