Skip to content

configure_formatter

faststream.log.logging.configure_formatter #

configure_formatter(
    formatter: Type[logging.Formatter],
    *args: Any,
    **kwargs: Any
) -> logging.Formatter

Configures a logging formatter.

PARAMETER DESCRIPTION
formatter

The type of logging formatter to configure.

TYPE: Type[Formatter]

*args

Additional positional arguments to pass to the formatter constructor.

TYPE: Any DEFAULT: ()

**kwargs

Additional keyword arguments to pass to the formatter constructor.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
Formatter

An instance of the configured logging formatter.

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/log/logging.py
def configure_formatter(
    formatter: Type[logging.Formatter], *args: Any, **kwargs: Any
) -> logging.Formatter:
    """Configures a logging formatter.

    Args:
        formatter: The type of logging formatter to configure.
        *args: Additional positional arguments to pass to the formatter constructor.
        **kwargs: Additional keyword arguments to pass to the formatter constructor.

    Returns:
        An instance of the configured logging formatter.
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    return formatter(*args, **kwargs)

Last update: 2023-11-13