Created
November 21, 2023 13:22
-
-
Save timlrx/6f29af725fd972836d2c20e02c11e684 to your computer and use it in GitHub Desktop.
Pretty Python Logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from rich.logging import RichHandler | |
logging.basicConfig( | |
level=logging.DEBUG, | |
format="%(message)s", | |
datefmt="[%X]", | |
handlers=[RichHandler(rich_tracebacks=True, omit_repeated_times=False)], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment