diff --git a/view/threats_and_menaces.py b/view/threats_and_menaces.py index 38daf28..5081dc0 100644 --- a/view/threats_and_menaces.py +++ b/view/threats_and_menaces.py @@ -1,13 +1,16 @@ from view.imprenta import Imprenta from telegram import ParseMode, Chat from emoji import emojize -from error_handler import logger +from error_handler import logging MAS_INFORMACION = emojize(":information: Más información") class ThreatsAndMenaces(Imprenta): + def __init__(self): + self.logger = logging.getLogger(__class__.__name__) + def enviar_noticias(self, chat: Chat, noticias: list) -> None: - logger.info("Enviando noticias a {chat_name}.".format(chat_name=chat.title)) + self.logger.info("Enviando noticias a {chat_name}.".format(chat_name=chat.title)) for noticia in noticias: chat.send_message("" + noticia.titulo + "" + "\n\n" + \