nonebot2/none/log.py
2018-07-21 00:46:34 +08:00

17 lines
362 B
Python

"""
Provide logger object.
Any other modules in "none" should use "logger" from this module
to log messages.
"""
import logging
import sys
logger = logging.getLogger('none')
default_handler = logging.StreamHandler(sys.stdout)
default_handler.setFormatter(logging.Formatter(
'[%(asctime)s] %(levelname)s: %(message)s'
))
logger.addHandler(default_handler)