from __future__ import annotations

import structlog


def build_service_banner(service_name: str, environment: str) -> str:
    service_upper = service_name.upper()
    border = "=" * 50
    lines = [
        border,
        f"  {service_upper}",
        f"  Environment: {environment}",
        border,
    ]
    return "\n".join(lines)


def log_service_banner(service_name: str, environment: str) -> None:
    logger = structlog.get_logger("banner")
    banner = build_service_banner(service_name, environment)
    logger.info(banner)
