Changed some logging statements

This commit is contained in:
Jonas Linter
2025-10-09 10:59:24 +02:00
parent 7d3d63db56
commit ac57999a85
2 changed files with 27 additions and 203 deletions

View File

@@ -189,12 +189,14 @@ async def lifespan(app: FastAPI):
"form_processed", hotel_id, partial(push_listener, hotel=hotel)
)
_LOGGER.info(
f"Registered push listener for hotel {hotel_id} with endpoint {push_endpoint.get('url')}"
"Registered push listener for hotel %s with endpoint %s",
hotel_id,
push_endpoint.get("url"),
)
elif push_endpoint and not hotel_id:
_LOGGER.warning(f"Hotel has push_endpoint but no hotel_id: {hotel}")
_LOGGER.warning("Hotel has push_endpoint but no hotel_id: %s", hotel)
elif hotel_id and not push_endpoint:
_LOGGER.info(f"Hotel {hotel_id} has no push_endpoint configured")
_LOGGER.info("Hotel %s has no push_endpoint configured", hotel_id)
# Create tables
async with engine.begin() as conn: