diff --git a/f_lib/logging/_console_handler.py b/f_lib/logging/_console_handler.py index 40a46c2..1508a5f 100644 --- a/f_lib/logging/_console_handler.py +++ b/f_lib/logging/_console_handler.py @@ -42,7 +42,9 @@ def __init__( # noqa: PLR0913 show_level: bool = True, show_path: bool = True, show_time: bool = True, + tracebacks_code_width: int = 88, tracebacks_extra_lines: int = 3, + tracebacks_max_frames: int = 100, tracebacks_show_locals: bool = False, tracebacks_suppress: Iterable[str | ModuleType] = (), tracebacks_theme: str | None = None, @@ -71,7 +73,9 @@ def __init__( # noqa: PLR0913 show_level: Show a column for the level. show_path: Show the path to the original log call. show_time: Show a column for the time. + tracebacks_code_width: Number of code characters used to render tracebacks, or None for full width. tracebacks_extra_lines: Additional lines of code to render tracebacks, or None for full width. + tracebacks_max_frames: Optional maximum number of frames returned by traceback. tracebacks_show_locals: Enable display of locals in tracebacks. tracebacks_suppress: Optional sequence of modules or paths to exclude from traceback. tracebacks_theme: Override pygments theme used in traceback. @@ -97,7 +101,9 @@ def __init__( # noqa: PLR0913 show_level=show_level, show_path=show_path, show_time=show_time, + tracebacks_code_width=tracebacks_code_width, tracebacks_extra_lines=tracebacks_extra_lines, + tracebacks_max_frames=tracebacks_max_frames, tracebacks_show_locals=tracebacks_show_locals, tracebacks_suppress=tracebacks_suppress, tracebacks_theme=tracebacks_theme, diff --git a/poetry.lock b/poetry.lock index b9378b4..d77ccdc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1103,13 +1103,13 @@ docutils = ">=0.11,<1.0" [[package]] name = "rich" -version = "13.7.1" +version = "13.8.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, - {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, + {file = "rich-13.8.0-py3-none-any.whl", hash = "sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc"}, + {file = "rich-13.8.0.tar.gz", hash = "sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4"}, ] [package.dependencies]