mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
add ignore lines
This commit is contained in:
parent
e806fff02b
commit
59da3b7395
@ -68,6 +68,10 @@ def join_log_channel(bot, trigger):
|
||||
|
||||
def stdio_logs_fetch(bot):
|
||||
|
||||
stdio_ignore = ["Loaded:"]
|
||||
for logtype in bot.memory['SpiceBot_Logs']["logs"].keys():
|
||||
stdio_ignore.append("[" + logtype + "]")
|
||||
|
||||
logfile = os.path.os.path.join(bot.config.core.logdir, 'stdio.log')
|
||||
|
||||
try:
|
||||
@ -84,10 +88,16 @@ def stdio_logs_fetch(bot):
|
||||
linenumindex.append(currentline)
|
||||
currentline += 1
|
||||
last_start = max(linenumindex)
|
||||
debuglines = log_file_lines[last_start:]
|
||||
filelines = log_file_lines[last_start:]
|
||||
except Exception as e:
|
||||
debuglines = e
|
||||
debuglines = []
|
||||
filelines = []
|
||||
|
||||
debuglines = []
|
||||
for line in filelines:
|
||||
if not line.startswith(tuple(stdio_ignore)):
|
||||
if not line.isspace():
|
||||
debuglines.append(str(line))
|
||||
|
||||
return debuglines
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user