from __future__ import annotations

import logging


logger = logging.getLogger("data_entry_app.security")


def log_security_event(event: str, **fields: object) -> None:
    safe_fields = {
        key: value
        for key, value in fields.items()
        if key not in {"password", "token", "cookie", "authorization"}
    }
    logger.info("%s | %s", event, safe_fields)
