Skip to content

Instantly share code, notes, and snippets.

@timlrx
Created November 21, 2023 13:22
Show Gist options
  • Select an option

  • Save timlrx/6f29af725fd972836d2c20e02c11e684 to your computer and use it in GitHub Desktop.

Select an option

Save timlrx/6f29af725fd972836d2c20e02c11e684 to your computer and use it in GitHub Desktop.
Pretty Python Logging
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