mirror of https://github.com/Textualize/rich.git
docs
This commit is contained in:
parent
31befa037c
commit
c8a5fb6a25
|
@ -16,8 +16,7 @@ class RichHandler(Handler):
|
||||||
"""A logging handler that renders output with Rich. The time / level / message and file are displayed in columns. The
|
"""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.
|
level is color coded, and the message is syntax highlighted.
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from rich.logging import RichHandler
|
from rich.logging import RichHandler
|
||||||
FORMAT = "%(message)s"
|
FORMAT = "%(message)s"
|
||||||
|
@ -26,7 +25,7 @@ class RichHandler(Handler):
|
||||||
)
|
)
|
||||||
log = logging.getLogger("rich")
|
log = logging.getLogger("rich")
|
||||||
log.info("Hello, World!")
|
log.info("Hello, World!")
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
level (int, optional): Log level. Defaults to logging.NOTSET.
|
level (int, optional): Log level. Defaults to logging.NOTSET.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue