示例#1
0
文件: logging.py 项目: smacke/rich
 def __init__(self,
              level: int = logging.NOTSET,
              console: Console = None) -> None:
     super().__init__(level=level)
     self.console = Console() if console is None else console
     self.highlighter = ReprHighlighter()
     self._log_render = LogRender(show_level=True)
示例#2
0
文件: logging.py 项目: Scriptim/PFERD
 def __init__(self, level: int) -> None:
     super().__init__(level=level)
     self.console = Console(
         theme=Theme({"logging.level.warning": Style(color="yellow")}))
     self._log_render = LogRender(show_level=True,
                                  show_time=False,
                                  show_path=False)
示例#3
0
    def __init__(
        self,
        level=logging.DEBUG,
        console=RichConsole(),
    ):

        super().__init__(level=level)

        self.console = console
        self._render = LogRender(show_level=True)
示例#4
0
 def __init__(
     self,
     level: int = logging.NOTSET,
     console: Console = None,
     *,
     enable_link_path: bool = True,
 ) -> None:
     super().__init__(level=level)
     self.console = console or get_console()
     self.highlighter = self.HIGHLIGHTER_CLASS()
     self._log_render = LogRender(show_level=True)
     self.enable_link_path = enable_link_path
示例#5
0
文件: logging.py 项目: gpsbird/rich
 def __init__(
     self,
     level: int = logging.NOTSET,
     console: Console = None,
     *,
     show_path: bool = True,
     enable_link_path: bool = True,
     highlighter: Highlighter = None,
     markup: bool = False,
 ) -> None:
     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.enable_link_path = enable_link_path
     self.markup = markup