Skip to content

Commit a946580

Browse files
committed
Clean up logging / info output
1 parent c277a2b commit a946580

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

src/backend/app_kernel.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,20 @@
22
import asyncio
33
import logging
44
import os
5-
65
# Azure monitoring
76
import re
87
import uuid
9-
108
from typing import Dict, List, Optional
119

12-
1310
from azure.monitor.opentelemetry import configure_azure_monitor
1411
from common.config.app_config import config
15-
from common.models.messages_kernel import (
16-
UserLanguage,
17-
)
18-
19-
12+
from common.models.messages_kernel import UserLanguage
2013
# FastAPI imports
21-
from fastapi import (
22-
FastAPI,
23-
Query,
24-
Request,
25-
)
14+
from fastapi import FastAPI, Query, Request
2615
from fastapi.middleware.cors import CORSMiddleware
27-
28-
2916
# Local imports
3017
from middleware.health_check import HealthCheckMiddleware
3118
from v3.api.router import app_v3
32-
3319
# Semantic Kernel imports
3420
from v3.orchestration.orchestration_manager import OrchestrationManager
3521

@@ -118,4 +104,4 @@ async def user_browser_language_endpoint(user_language: UserLanguage, request: R
118104
if __name__ == "__main__":
119105
import uvicorn
120106

121-
uvicorn.run("app_kernel:app", host="127.0.0.1", port=8000, reload=True)
107+
uvicorn.run("app_kernel:app", host="127.0.0.1", port=8000, reload=True, log_level="info", access_log=False)

src/backend/v3/config/settings.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,32 +197,25 @@ async def send_status_update_async(
197197
)
198198
return
199199

200-
print(f" websocket original message: {message}")
201-
print(f" websocket message type: {type(message)}")
202200

203201
# Convert message to proper format for frontend
204202
try:
205203
if hasattr(message, "to_dict"):
206204
# Use the custom to_dict method if available
207205
message_data = message.to_dict()
208-
print(f" websocket used to_dict(): {message_data}")
209206
elif hasattr(message, "data") and hasattr(message, "type"):
210207
# Handle structured messages with data property
211208
message_data = message.data
212-
print(f" websocket used message.data: {message_data}")
213209
elif isinstance(message, dict):
214210
# Already a dictionary
215211
message_data = message
216-
print(f" websocket already dict: {message_data}")
217212
else:
218213
# Convert to string if it's a simple type
219214
message_data = str(message)
220-
print(f" websocket converted to string: {message_data}")
221215
except Exception as e:
222-
print(f"Error processing message data: {e}")
216+
logger.error("Error processing message data: %s", e)
223217
message_data = str(message)
224218

225-
print(f" websocket final message_data: {message_data}")
226219

227220
standard_message = {
228221
"type": message_type,

src/frontend/frontend_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ async def serve_app(full_path: str):
6060
return FileResponse(INDEX_HTML)
6161

6262
if __name__ == "__main__":
63-
uvicorn.run(app, host="127.0.0.1", port=3000)
63+
uvicorn.run(app, host="127.0.0.1", port=3000, access_log=False, log_level="info")

src/mcp_server/services/hr_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def register_tools(self, mcp) -> None:
2020

2121
@mcp.tool(tags={self.domain.value})
2222
async def onboard_employee() -> str:
23-
"""Always use the following onboarding checklist for all new Contoso employees. These are the only steps needed to onboard any new employee."""
23+
"""Always use the following onboarding checklist for all new Contoso employees. These are the ONLY steps needed to onboard any new employee."""
2424
onboarding_checklist = """
2525
2626
## HR representative must...
@@ -42,7 +42,7 @@ async def onboard_employee() -> str:
4242
## No other onboarding steps are required for any employee
4343
4444
"""
45-
return f"Here are the necessary steps to onboard a new Contoso employee: {onboarding_checklist}."
45+
return f"Here are the necessary steps to onboard a new Contoso employee: {onboarding_checklist}. These are the ONLY steps needed to onboard any new employee. Do not add any additional steps."
4646

4747
@mcp.tool(tags={self.domain.value})
4848
async def schedule_orientation_session(employee_name: str, date: str) -> str:

0 commit comments

Comments
 (0)