nonebot2/nonebot/log.py
2020-07-04 22:51:10 +08:00

14 lines
328 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import logging
logger = logging.getLogger("nonebot")
"""nonebot logger"""
default_handler = logging.StreamHandler(sys.stdout)
default_handler.setFormatter(
logging.Formatter("[%(asctime)s %(name)s] %(levelname)s: %(message)s"))
logger.addHandler(default_handler)