Merge branch 'master' of github.com:willmcgugan/rich

This commit is contained in:
Will McGugan 2020-07-29 13:38:31 +01:00
commit e399103b2c
2 changed files with 6 additions and 2 deletions

View File

@ -364,7 +364,7 @@ class Console:
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

View File

@ -48,6 +48,8 @@ class RichHandler(Handler):
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,
@ -56,7 +58,9 @@ class RichHandler(Handler):
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