import random import structlog from fastapi import APIRouter from helpers import formatters custom_structlog_logger = structlog.stdlib.get_logger(__name__) router = APIRouter() @router.get("/health") def health(): n = random.randint(-1, 1) custom_structlog_logger.info(f"random int:{n}") return formatters.request_formatter(f"{n}")