Skip to content

Commit

Permalink
Merge pull request #182 from nathanrpage97/feat/logging-control
Browse files Browse the repository at this point in the history
Update RichHandler to include all flags of LogRender
  • Loading branch information
willmcgugan committed Jul 29, 2020
2 parents 579a29c + 3e746dc commit e33b3f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,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(
show_time=show_time, show_level=show_level, show_path=show_path
)
self.enable_link_path = enable_link_path
self.markup = markup

Expand Down

0 comments on commit e33b3f6

Please sign in to comment.