From f2c1e78445cef84f803347f559141c24ff91a957 Mon Sep 17 00:00:00 2001 From: jderrien Date: Sun, 16 Jun 2024 12:01:02 +0200 Subject: [PATCH] feat(logging): always log exceptions by default (#3574) --- litestar/logging/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litestar/logging/config.py b/litestar/logging/config.py index d82acac5c4..b69f9c56e2 100644 --- a/litestar/logging/config.py +++ b/litestar/logging/config.py @@ -242,7 +242,7 @@ class LoggingConfig(BaseLoggingConfig): """ configure_root_logger: bool = field(default=True) """Should the root logger be configured, defaults to True for ease of configuration.""" - log_exceptions: Literal["always", "debug", "never"] = field(default="debug") + log_exceptions: Literal["always", "debug", "never"] = field(default="always") """Should exceptions be logged, defaults to log exceptions when 'app.debug == True'""" traceback_line_limit: int = field(default=-1) """Max number of lines to print for exception traceback. @@ -471,7 +471,7 @@ class StructLoggingConfig(BaseLoggingConfig): """Logger factory to use.""" cache_logger_on_first_use: bool = field(default=True) """Whether to cache the logger configuration and reuse.""" - log_exceptions: Literal["always", "debug", "never"] = field(default="debug") + log_exceptions: Literal["always", "debug", "never"] = field(default="always") """Should exceptions be logged, defaults to log exceptions when 'app.debug == True'""" traceback_line_limit: int = field(default=-1) """Max number of lines to print for exception traceback.