修复多重log问题
This commit is contained in:
parent
186c709801
commit
bbc1dca904
@ -20,9 +20,10 @@ logs = getLogger(__name__)
|
|||||||
logging_format = "%(levelname)s [%(asctime)s] [%(name)s] %(message)s"
|
logging_format = "%(levelname)s [%(asctime)s] [%(name)s] %(message)s"
|
||||||
logging_handler = StreamHandler()
|
logging_handler = StreamHandler()
|
||||||
logging_handler.setFormatter(ColoredFormatter(logging_format))
|
logging_handler.setFormatter(ColoredFormatter(logging_format))
|
||||||
logs.addHandler(logging_handler)
|
root_logger = logging.getLogger()
|
||||||
|
root_logger.setLevel(logging.ERROR)
|
||||||
|
root_logger.addHandler(logging_handler)
|
||||||
basicConfig(level=INFO)
|
basicConfig(level=INFO)
|
||||||
getLogger('telethon').setLevel(INFO)
|
|
||||||
logs.setLevel(INFO)
|
logs.setLevel(INFO)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user