Skip to content

Mengla/logging-minor-improve#45063

Merged
lusu-msft merged 2 commits intoAzure:lusu/agentserver-1110from
melionel:mengla/logging-minor-improve
Feb 6, 2026
Merged

Mengla/logging-minor-improve#45063
lusu-msft merged 2 commits intoAzure:lusu/agentserver-1110from
melionel:mengla/logging-minor-improve

Conversation

@melionel
Copy link

@melionel melionel commented Feb 6, 2026

Description

Problem

  1. Confusing print() statements like "environment variable APPLICATIONINSIGHTS_CONNECTION_STRING not set." appeared as errors but were just informational
  2. No log message indicated the server started successfully - only "Starting..." was shown

Changes

azure/ai/agentserver/core/logger.py

  • Replaced all print() statements with proper logger.debug() / logger.warning() calls
  • get_project_endpoint(): Added optional logger parameter with debug logs showing endpoint source:
    - "Using project endpoint from AZURE_AI_PROJECT_ENDPOINT: {endpoint}"
    - "Using project endpoint derived from AGENT_PROJECT_RESOURCE_ID: {endpoint}"
  • get_application_insights_connstr(): Added optional logger parameter, replaced print statements with:
    - logger.debug("Application Insights not configured, telemetry export disabled.")
    - logger.debug("No Application Insights connection found for project: {endpoint}")

azure/ai/agentserver/core/server/base.py

  • Added startup success log: "FoundryCBAgent server started successfully on port {port}"
  • Pass logger to get_project_endpoint() for consistent logging

azure/ai/agentserver/agentframework/_workflow_agent_adapter.py

  • Pass logger to get_project_endpoint() for consistent logging

Result

2026-02-06 10:04:16 - azure.ai.agentserver - INFO - Starting FoundryCBAgent server on port 8088
INFO: Started server process [63464]
INFO: Waiting for application startup.
2026-02-06 10:04:17 - azure.ai.agentserver - INFO - FoundryCBAgent server started successfully on port 8088

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Hosted Agents sdk/agentserver/* labels Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Thank you for your contribution @melionel! We will review the pull request and get back to you soon.

@lusu-msft lusu-msft merged commit 3a5e045 into Azure:lusu/agentserver-1110 Feb 6, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants