Removing logger from ApplicationOptions#443
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the unused logger field from ApplicationOptions, steering consumers toward using Python’s standard logging module directly, and applies minor formatting cleanups in AgentApplication error raising.
Changes:
- Removed the
ApplicationOptions.loggerdataclass field (and other dead/commented fields nearby). - Reformatted several
raise ApplicationError(...)statements for readability/consistency.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/app_options.py | Removes the unused logger option from ApplicationOptions (public API surface). |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py | Minor formatting-only adjustments to ApplicationError raising style. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py:51
AgentApplicationnow imports_log_app_configfrom. _utils, but there is no_utilsmodule undermicrosoft_agents.hosting.core.appin this repo. This will raiseModuleNotFoundErrorat import time.
logger = logging.getLogger(__name__)
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py:110
_log_app_configis called here but is not defined anywhere in the package (and the import currently points to a non-existent module). Either implement the helper or revert to the prior inline debug logging.
if not options:
# TODO: consolidate configuration story
# Take the options from the kwargs and create an ApplicationOptions instance
option_kwargs = dict(
It doesn't get used, and it doesn't need to be used. Users should instead rely on Python's logging module directly, unless we see a specific need for special handling.