Skip to content

Commit

Permalink
Removed more email references.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemna committed Dec 10, 2024
1 parent 15260bd commit aa85ac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion aprsd/cmds/list_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 3 additions & 27 deletions aprsd/log/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand All @@ -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="<fg #BABABA>")

0 comments on commit aa85ac0

Please sign in to comment.