# -*- coding: utf-8 -*-
from __future__ import annotations

import logging

from hotpocket_backend.apps.core.context import get_request_id


class RequestIDFilter(logging.Filter):
    def filter(self, record: logging.LogRecord) -> bool:
        record.request_id = get_request_id()
        return True
