structlog#

class litestar.plugins.structlog.StructlogConfig#

Bases: object

StructlogConfig(structlog_logging_config: ‘StructLoggingConfig’ = <factory>, middleware_logging_config: ‘LoggingMiddlewareConfig’ = <factory>, enable_middleware_logging: ‘bool’ = True)

structlog_logging_config: StructLoggingConfig#

Structlog Logging configuration for Litestar. See litestar.logging.config.StructLoggingConfig` for details.

middleware_logging_config: LoggingMiddlewareConfig#

Middleware logging config.

enable_middleware_logging: bool = True#

Enable request logging.

__init__(structlog_logging_config: ~litestar.logging.config.StructLoggingConfig = <factory>, middleware_logging_config: ~litestar.middleware.logging.LoggingMiddlewareConfig = <factory>, enable_middleware_logging: bool = True) None#
class litestar.plugins.structlog.StructlogPlugin#

Bases: InitPluginProtocol

Structlog Plugin.

__init__(config: StructlogConfig | None = None) None#
on_app_init(app_config: AppConfig) AppConfig#

Structlog Plugin

Parameters:

app_config – The AppConfig instance.

Returns:

The app config object.