Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
pip._vendor.rich.logging.RichHandler Class Reference
Inheritance diagram for pip._vendor.rich.logging.RichHandler:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.rich.logging.RichHandler:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, Union[int, str] level=logging.NOTSET, Optional[Console] console=None, *bool show_time=True, bool omit_repeated_times=True, bool show_level=True, bool show_path=True, bool enable_link_path=True, Optional[Highlighter] highlighter=None, bool markup=False, bool rich_tracebacks=False, Optional[int] tracebacks_width=None, int tracebacks_extra_lines=3, Optional[str] tracebacks_theme=None, bool tracebacks_word_wrap=True, bool tracebacks_show_locals=False, Iterable[Union[str, ModuleType]] tracebacks_suppress=(), int locals_max_length=10, int locals_max_string=80, Union[str, FormatTimeCallable] log_time_format="[%x %X]", Optional[List[str]] keywords=None)
 
Text get_level_text (self, LogRecord record)
 
None emit (self, LogRecord record)
 
"ConsoleRenderable" render_message (self, LogRecord record, str message)
 
"ConsoleRenderable" render (self, *LogRecord record, Optional[Traceback] traceback, "ConsoleRenderable" message_renderable)
 

Public Attributes

 console
 
 highlighter
 
 enable_link_path
 
 markup
 
 rich_tracebacks
 
 tracebacks_width
 
 tracebacks_extra_lines
 
 tracebacks_theme
 
 tracebacks_word_wrap
 
 tracebacks_show_locals
 
 tracebacks_suppress
 
 locals_max_length
 
 locals_max_string
 
 keywords
 

Static Public Attributes

list KEYWORDS
 
ClassVar HIGHLIGHTER_CLASS = ReprHighlighter
 

Protected Attributes

 _log_render
 

Detailed Description

A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.
The level is color coded, and the message is syntax highlighted.

Note:
    Be careful when enabling console markup in log messages if you have configured logging for libraries not
    under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.

Args:
    level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.
    console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.
        Default will use a global console instance writing to stdout.
    show_time (bool, optional): Show a column for the time. Defaults to True.
    omit_repeated_times (bool, optional): Omit repetition of the same time. Defaults to True.
    show_level (bool, optional): Show a column for the level. Defaults to True.
    show_path (bool, optional): Show the path to the original log call. Defaults to True.
    enable_link_path (bool, optional): Enable terminal link of path column to file. Defaults to True.
    highlighter (Highlighter, optional): Highlighter to style log messages, or None to use ReprHighlighter. Defaults to None.
    markup (bool, optional): Enable console markup in log messages. Defaults to False.
    rich_tracebacks (bool, optional): Enable rich tracebacks with syntax highlighting and formatting. Defaults to False.
    tracebacks_width (Optional[int], optional): Number of characters used to render tracebacks, or None for full width. Defaults to None.
    tracebacks_extra_lines (int, optional): Additional lines of code to render tracebacks, or None for full width. Defaults to None.
    tracebacks_theme (str, optional): Override pygments theme used in traceback.
    tracebacks_word_wrap (bool, optional): Enable word wrapping of long tracebacks lines. Defaults to True.
    tracebacks_show_locals (bool, optional): Enable display of locals in tracebacks. Defaults to False.
    tracebacks_suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%x %X] ".
    keywords (List[str], optional): List of words to highlight instead of ``RichHandler.KEYWORDS``.

Member Function Documentation

◆ emit()

None pip._vendor.rich.logging.RichHandler.emit (   self,
LogRecord  record 
)
Invoked by logging.

Reimplemented in pip._internal.utils.logging.RichPipStreamHandler.

◆ get_level_text()

Text pip._vendor.rich.logging.RichHandler.get_level_text (   self,
LogRecord  record 
)
Get the level name from the record.

Args:
    record (LogRecord): LogRecord instance.

Returns:
    Text: A tuple of the style and level name.

◆ render()

"ConsoleRenderable" pip._vendor.rich.logging.RichHandler.render (   self,
*LogRecord  record,
Optional[Traceback traceback,
"ConsoleRenderable"  message_renderable 
)
Render log for display.

Args:
    record (LogRecord): logging Record.
    traceback (Optional[Traceback]): Traceback instance or None for no Traceback.
    message_renderable (ConsoleRenderable): Renderable (typically Text) containing log message contents.

Returns:
    ConsoleRenderable: Renderable to display log.

◆ render_message()

"ConsoleRenderable" pip._vendor.rich.logging.RichHandler.render_message (   self,
LogRecord  record,
str  message 
)
Render message text in to Text.

Args:
    record (LogRecord): logging Record.
    message (str): String containing log message.

Returns:
    ConsoleRenderable: Renderable to display log message.

Member Data Documentation

◆ KEYWORDS

list pip._vendor.rich.logging.RichHandler.KEYWORDS
static
Initial value:
= [
"GET",
"POST",
"HEAD",
"PUT",
"DELETE",
"OPTIONS",
"TRACE",
"PATCH",
]

The documentation for this class was generated from the following file: