From aa85ac08b64acafa41900f827674e783eb49f972 Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 10 Dec 2024 16:55:05 -0500 Subject: [PATCH] Removed more email references. --- aprsd/cmds/list_plugins.py | 2 +- aprsd/log/log.py | 30 +++--------------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/aprsd/cmds/list_plugins.py b/aprsd/cmds/list_plugins.py index 7022933..617671e 100644 --- a/aprsd/cmds/list_plugins.py +++ b/aprsd/cmds/list_plugins.py @@ -122,7 +122,7 @@ def get_installed_extensions(): def show_built_in_plugins(console): - modules = [email, fortune, location, notify, ping, time, version, weather] + modules = [fortune, location, notify, ping, time, version, weather] plugins = [] for module in modules: diff --git a/aprsd/log/log.py b/aprsd/log/log.py index 8204106..c751d63 100644 --- a/aprsd/log/log.py +++ b/aprsd/log/log.py @@ -59,27 +59,18 @@ def setup_logging(loglevel=None, quiet=False): logging.root.handlers = [InterceptHandler()] logging.root.setLevel(log_level) - imap_list = [ - "imapclient.imaplib", "imaplib", "imapclient", - "imapclient.util", - ] - aprslib_list = [ + # We don't really want to see the aprslib parsing debug output. + disable_list = [ "aprslib", "aprslib.parsing", "aprslib.exceptions", ] - # We don't really want to see the aprslib parsing debug output. - disable_list = imap_list + aprslib_list - # remove every other logger's handlers # and propagate to root logger for name in logging.root.manager.loggerDict.keys(): logging.getLogger(name).handlers = [] - if name in disable_list: - logging.getLogger(name).propagate = False - else: - logging.getLogger(name).propagate = True + logging.getLogger(name).propagate = name not in disable_list handlers = [ { @@ -101,21 +92,6 @@ def setup_logging(loglevel=None, quiet=False): }, ) - if CONF.email_plugin.enabled and CONF.email_plugin.debug: - for name in imap_list: - logging.getLogger(name).propagate = True - - # if CONF.admin.web_enabled: - # qh = QueueHandler(logging_queue) - # handlers.append( - # { - # "sink": qh, "serialize": False, - # "format": CONF.logging.logformat, - # "level": log_level, - # "colorize": False, - # }, - # ) - # configure loguru logger.configure(handlers=handlers) logger.level("DEBUG", color="")