From d285738c628a706ab7a67dae2fcbfec677e9f1c0 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 a0f98a6849..e58680ff18 100644 --- a/litestar/logging/config.py +++ b/litestar/logging/config.py @@ -237,7 +237,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. @@ -465,7 +465,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.