mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
Update Log system
This commit is contained in:
parent
222acfb948
commit
762cf02728
@ -5,7 +5,7 @@ from __future__ import unicode_literals, absolute_import, division, print_functi
|
|||||||
import sopel.module
|
import sopel.module
|
||||||
|
|
||||||
from sopel_modules.SpiceBot_Events.System import bot_events_recieved
|
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')
|
@sopel.module.event('2005')
|
||||||
@ -13,7 +13,7 @@ from .Logs import systemd_logs_fetch
|
|||||||
def bot_startup_monologue_start(bot, trigger):
|
def bot_startup_monologue_start(bot, trigger):
|
||||||
bot_events_recieved(bot, trigger.event)
|
bot_events_recieved(bot, trigger.event)
|
||||||
|
|
||||||
debuglines = systemd_logs_fetch(bot)
|
debuglines = stdio_logs_fetch(bot)
|
||||||
|
|
||||||
searchphrasefound = []
|
searchphrasefound = []
|
||||||
for line in debuglines:
|
for line in debuglines:
|
||||||
|
|||||||
@ -8,11 +8,11 @@ import spicemanip
|
|||||||
|
|
||||||
from sopel_modules.SpiceBot_SBTools import sopel_triggerargs, command_permissions_check, inlist, inlist_match
|
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 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')
|
@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'):
|
while not bot_events_check(bot, '2004'):
|
||||||
pass
|
pass
|
||||||
@ -44,3 +44,4 @@ def bot_command_action(bot, trigger):
|
|||||||
bot.osd("Is Examining " + str(logtype) + " log(s).")
|
bot.osd("Is Examining " + str(logtype) + " log(s).")
|
||||||
for line in logindex:
|
for line in logindex:
|
||||||
bot.osd(" " + str(line))
|
bot.osd(" " + str(line))
|
||||||
|
bot.osd(str(logtype) + " log(s) Complete.")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user