LoggingMixin
faststream.broker.core.mixins.LoggingMixin #
LoggingMixin(
*args: Any,
logger: Optional[Logger] = access_logger,
log_level: int = logging.INFO,
log_fmt: Optional[
str
] = "%(asctime)s %(levelname)s - %(message)s",
**kwargs: Any
)
A mixin class for logging.
METHOD | DESCRIPTION |
---|---|
fmt | getter method for _fmt attribute |
_get_log_context | returns a dictionary with log context information |
_log | logs a message with optional log level, extra data, and exception info |
Initialize the class.
PARAMETER | DESCRIPTION |
---|---|
*args | Variable length argument list TYPE: |
logger | Optional logger object |
log_level | Log level (default: logging.INFO) |
log_fmt | Log format (default: "%(asctime)s %(levelname)s - %(message)s") TYPE: |
**kwargs | Arbitrary keyword arguments TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |