mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-12 22:45:47 +08:00
17 lines
371 B
Python
17 lines
371 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 %(name)s] %(levelname)s: %(message)s'
|
|
))
|
|
logger.addHandler(default_handler)
|