Update Log system

This commit is contained in:
deathbybandaid 2019-05-09 11:37:49 -04:00
parent 222acfb948
commit 762cf02728
2 changed files with 5 additions and 4 deletions

View File

@ -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:

View File

@ -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.")