From 762cf027288a281d68c3a4a84e1ca967852af6d1 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 9 May 2019 11:37:49 -0400 Subject: [PATCH] Update Log system --- sopel_modules/SpiceBot_Logs/ErrorDisplay.py | 4 ++-- sopel_modules/SpiceBot_Logs/Logs_Command.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sopel_modules/SpiceBot_Logs/ErrorDisplay.py b/sopel_modules/SpiceBot_Logs/ErrorDisplay.py index c31ab53..39e50a3 100644 --- a/sopel_modules/SpiceBot_Logs/ErrorDisplay.py +++ b/sopel_modules/SpiceBot_Logs/ErrorDisplay.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi import sopel.module from sopel_modules.SpiceBot_Events.System import bot_events_recieved -from .Logs import systemd_logs_fetch +from .Logs import stdio_logs_fetch @sopel.module.event('2005') @@ -13,7 +13,7 @@ from .Logs import systemd_logs_fetch def bot_startup_monologue_start(bot, trigger): bot_events_recieved(bot, trigger.event) - debuglines = systemd_logs_fetch(bot) + debuglines = stdio_logs_fetch(bot) searchphrasefound = [] for line in debuglines: diff --git a/sopel_modules/SpiceBot_Logs/Logs_Command.py b/sopel_modules/SpiceBot_Logs/Logs_Command.py index 2d6ac9c..3014765 100644 --- a/sopel_modules/SpiceBot_Logs/Logs_Command.py +++ b/sopel_modules/SpiceBot_Logs/Logs_Command.py @@ -8,11 +8,11 @@ import spicemanip from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, command_permissions_check, inlist, inlist_match from sopel_modules.SpiceBot_Events.System import bot_events_check -from .Logs import systemd_logs_fetch +from .Logs import systemd_logs_fetch, stdio_logs_fetch @sopel.module.nickname_commands('logs', 'debug') -def bot_command_action(bot, trigger): +def bot_command_logs(bot, trigger): while not bot_events_check(bot, '2004'): pass @@ -44,3 +44,4 @@ def bot_command_action(bot, trigger): bot.osd("Is Examining " + str(logtype) + " log(s).") for line in logindex: bot.osd(" " + str(line)) + bot.osd(str(logtype) + " log(s) Complete.")