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

Update RichHandler to include all flags of LogRender #182

Merged
merged 5 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def __init__(

self._lock = threading.RLock()
self._log_render = LogRender(
show_time=log_time, show_path=log_path, time_format=log_time_format
show_time=log_time, show_path=log_path, time_format=log_time_format,
)
self.highlighter: HighlighterType = highlighter or _null_highlighter
self.safe_box = safe_box
Expand Down
6 changes: 5 additions & 1 deletion rich/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def __init__(
level: int = logging.NOTSET,
console: Console = None,
*,
show_time: bool = True,
show_level: bool = True,
show_path: bool = True,
enable_link_path: bool = True,
highlighter: Highlighter = None,
Expand All @@ -56,7 +58,9 @@ def __init__(
super().__init__(level=level)
self.console = console or get_console()
self.highlighter = highlighter or self.HIGHLIGHTER_CLASS()
self._log_render = LogRender(show_level=True, show_path=show_path)
self._log_render = LogRender(
nathanrpage97 marked this conversation as resolved.
Show resolved Hide resolved
show_time=show_time, show_level=show_level, show_path=show_path
)
self.enable_link_path = enable_link_path
self.markup = markup

Expand Down