mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-17 07:17:25 -04:00
feat: suppress healthcheck logs in dev mode
Reduce visual noise during development by logging healthcheck requests at DEBUG level when DEPLOYMENT_MODE=DEV. Production mode continues to log healthchecks at INFO level for proper observability. Changes: - Modified /health endpoint to check deployment mode - DEV mode: logs at DEBUG level (only visible with DEBUG logging) - PROD mode: logs at INFO level (maintains current behavior) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -713,6 +713,14 @@ def create_app(
|
|||||||
Returns:
|
Returns:
|
||||||
Health status and timestamp
|
Health status and timestamp
|
||||||
"""
|
"""
|
||||||
|
from tools.deployment_config import is_dev_mode
|
||||||
|
|
||||||
|
# Log at DEBUG in dev mode, INFO in prod mode
|
||||||
|
if is_dev_mode():
|
||||||
|
logger.debug("Health check")
|
||||||
|
else:
|
||||||
|
logger.info("Health check")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Test database connection
|
# Test database connection
|
||||||
conn = get_db_connection(app.state.db_path)
|
conn = get_db_connection(app.state.db_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user