To enable debug level for RTBL plugin only:
>>> import logging
>>> from sid.rtbl import RTBL
>>> RTBL.log_level = logging.DEBUG
Then instanciate the bot and register plugins
# SPDX-FileCopyrightText: 2010, 2011 Anaƫl Verrier <elghinn@free.fr>
# SPDX-FileCopyrightText: 2014, 2020, 2023 kaliko <kaliko@azylum.org>
+import logging
from slixmpp.exceptions import XMPPError
:param sid.sid.MUCBot bot: bot the plugin is load from
"""
+ #: Overriding bot log level for the plugin
+ log_level = None
def __init__(self, bot):
self.bot = bot
self.log = bot.log.getChild(self.__class__.__name__)
#: :py:obj:`list` : List of tuples (event, handler)
self.handlers = []
+ if self.log_level:
+ self.log.setLevel(self.log_level)
def add_handlers(self):
"""Add handlers declared in self.hanlders"""