# -*- coding:utf-8 -*-
"""
@author: yq
@time: 2023/5/16
@desc: 
"""

import logging

from contextvars import ContextVar

request_id_context = ContextVar('request_id')


class TraceIdFilter(logging.Filter):

    def filter(self, record):
        # record.requestId = request_id_context.get()
        record.requestId = "requestId"
        return True
