bobbui/json-logging-python

Failed to customize Procedure

hanzhenbjm opened this issue · 2 comments

`class TestLog(json_logging.JSONLogWebFormatter):
def _format_log_object(self, record, request_util):

    json_log_object = super(TestLog, self)._format_log_object(record, request_util)
    json_log_object.update({
        "message": _sanitize_log_msg(record),
        "lineno": record.lineno,
        "TraceId": request_util.get_correlation_id(within_formatter=True),
        "log_type": "desc"
    })

    return json_log_object`

use flask web framework,

Failed to customize Procedure

{"written_ts": 1630401382592000000, "thread": "Thread-2", "level": "DEBUG", "line_no": 30, "module": "main", "correlation_id": "1c030c00-0a3c-11ec-a078-aced5c5e9c18", "msg": "ok=123", "logger": "test-logger", "type": "log", "written_at": "2021-08-31T09:16:22.592Z"}
There's nothing I added

image
image
and What this function does (CustomDefaultRequestResponseDTO)
thanks

can u provide your full source code