mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 14:39:54 -05:00
stdio imporvements
This commit is contained in:
parent
0dd48dd100
commit
59ee2f41f5
@ -68,7 +68,7 @@ def join_log_channel(bot, trigger):
|
|||||||
|
|
||||||
def stdio_logs_fetch(bot):
|
def stdio_logs_fetch(bot):
|
||||||
|
|
||||||
stdio_ignore = ["Loaded:"]
|
stdio_ignore = []
|
||||||
for logtype in bot.memory['SpiceBot_Logs']["logs"].keys():
|
for logtype in bot.memory['SpiceBot_Logs']["logs"].keys():
|
||||||
stdio_ignore.append("[" + logtype + "]")
|
stdio_ignore.append("[" + logtype + "]")
|
||||||
|
|
||||||
@ -94,10 +94,15 @@ def stdio_logs_fetch(bot):
|
|||||||
filelines = []
|
filelines = []
|
||||||
|
|
||||||
debuglines = []
|
debuglines = []
|
||||||
|
loadedmodules = []
|
||||||
for line in filelines:
|
for line in filelines:
|
||||||
if not line.startswith(tuple(stdio_ignore)):
|
if not line.startswith("Loaded:"):
|
||||||
if not line.isspace():
|
loadedmodules.append(str(line).split("Loaded:")[-1])
|
||||||
|
else:
|
||||||
|
if not line.startswith(tuple(stdio_ignore)) and not line.isspace():
|
||||||
debuglines.append(str(line))
|
debuglines.append(str(line))
|
||||||
|
loadedmodules = "Loaded: " + spicemanip.main(loadedmodules, 'andlist')
|
||||||
|
debuglines.insert(1, loadedmodules)
|
||||||
|
|
||||||
return debuglines
|
return debuglines
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user