utils
Logging utilities.
msgspec_json_renderer()
A JSON Renderer for structlog using msgspec.
Msgspec doesn't have an API consistent with the stdlib's `json` module,
which is required for structlog's `JSONRenderer`.
EventFilter
A structlog processor that removes keys from the log event if they exist.
EventFilter ¶
Remove keys from the log event.
Add an instance to the processor chain.
Examples structlog.configure( ..., processors=[ ..., EventFilter(["color_message"]), ..., ] )
__call__ ¶
Receive the log event, and filter keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
_ |
required | ||
__ |
required | ||
event_dict |
The data to be logged. |
required |
Returns:
Type | Description |
---|---|
EventDict
|
The log event with any key in |