LoggingMixin
faststream.broker.core.mixins.LoggingMixin #
LoggingMixin(
*args: Any,
logger: Optional[logging.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 |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
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 |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/core/mixins.py
Last update: 2023-11-13