Spaces:
Paused
Paused
File size: 414 Bytes
e26cd2e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import sys
from loguru import logger
logger.remove()
logger_str_format = (
"<white>{time:YYYY-MM-DD HH:mm:ss}</white> | "
"<level>{level: <8}</level> | "
"<c><b>{line: <5}</b></c>| "
"<c><b>{extra[session_name]: <7}</b></c> | "
"<white><b>{message}</b></white>"
)
logger.add(sink=sys.stdout, format=logger_str_format, colorize=True)
log = logger.bind(session_name="GLOBAL").opt(colors=True)
|