-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logging_format
configuration option in api
#40057
Conversation
There was a problem hiding this 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 adds a new "logging_format" configuration option to the API for customizing log formatting, updates the logging setup accordingly, and includes tests and sample usage changes.
- Added a new LOGGING_FORMAT_ARG constant and default configuration logic
- Updated _setup_logging to handle the logging_format option
- Modified tests and samples to verify and demonstrate the new functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py | Added tests to verify that a provided logging_format is correctly processed and applied via a Formatter. |
sdk/monitor/azure-monitor-opentelemetry/samples/logging/basic.py | Updated sample usage to include the logging_format configuration and updated the logger names accordingly. |
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_utils/configurations.py | Added default handling for logging_format within configurations. |
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py | Modified logging setup to create a Formatter with the specified logging_format, handling any exceptions gracefully. |
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_constants.py | Added a new constant for logging_format configuration. |
API change check API changes are not detected in this pull request. |
No description provided.