Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging): always log exceptions by default #3574

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions litestar/logging/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Loading