Pythom lomgimng yummy cool...

This commit is contained in:
Casey 2023-01-26 13:44:30 +03:00
parent f3f7bff945
commit 1632cddcb4
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,14 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from asyncio import run from asyncio import run
from configparser import ConfigParser, ExtendedInterpolation from configparser import ConfigParser, ExtendedInterpolation
from logging import INFO, Formatter, StreamHandler, getLevelName, getLogger from logging import (
INFO,
Formatter,
Logger,
StreamHandler,
getLevelName,
getLogger,
)
from sys import stdout from sys import stdout
from mastoposter import execute_integrations, load_integrations_from from mastoposter import execute_integrations, load_integrations_from
from mastoposter.integrations import FilteredIntegration from mastoposter.integrations import FilteredIntegration
@ -26,6 +33,9 @@ def init_logger(loglevel: int = INFO):
stdout_handler.setFormatter(formatter) stdout_handler.setFormatter(formatter)
logger.addHandler(stdout_handler) logger.addHandler(stdout_handler)
logger.setLevel(loglevel) logger.setLevel(loglevel)
for log in logger.manager.loggerDict.values():
if isinstance(log, Logger):
log.setLevel(loglevel)
async def listen( async def listen(