mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
more error logging tweaks
This commit is contained in:
parent
8fe7254b20
commit
b511462b15
@ -18,12 +18,8 @@ def bot_startup_monologue_start(bot, trigger):
|
|||||||
|
|
||||||
searchphrasefound = []
|
searchphrasefound = []
|
||||||
for line in debuglines:
|
for line in debuglines:
|
||||||
if "modules failed to load" in str(line) and "0 modules failed to load" not in str(line):
|
if str(line).endswith("failed to load") and not str(line).startswith("0"):
|
||||||
searchphrase = str(line).replace(" modules failed to load", "")
|
searchphrasefound.append(line)
|
||||||
searchphrasefound.append(str(searchphrase) + " module(s) failed")
|
|
||||||
elif "dict files failed to load" in str(line) and "0 dict files failed to load" not in str(line):
|
|
||||||
searchphrase = str(line).replace(" dict files failed to load", "")
|
|
||||||
searchphrasefound.append(str(searchphrase) + " dict file(s) failed")
|
|
||||||
|
|
||||||
if len(searchphrasefound):
|
if len(searchphrasefound):
|
||||||
for foundphase in searchphrasefound:
|
for foundphase in searchphrasefound:
|
||||||
|
|||||||
@ -440,10 +440,10 @@ def read_directory_json_to_dict(bot, directories, configtypename="Config File",
|
|||||||
|
|
||||||
if filecount:
|
if filecount:
|
||||||
if bot:
|
if bot:
|
||||||
bot_logging(bot, log_from, 'Registered %d %s files,' % (filecount, configtypename))
|
bot_logging(bot, log_from, 'Registered %d %s dict files,' % (filecount, configtypename))
|
||||||
bot_logging(bot, log_from, '%d %s files failed to load' % (fileopenfail, configtypename))
|
bot_logging(bot, log_from, '%d %s dict files failed to load' % (fileopenfail, configtypename), True)
|
||||||
else:
|
else:
|
||||||
if bot:
|
if bot:
|
||||||
bot_logging(bot, log_from, "Warning: Couldn't load any %s files" % (configtypename))
|
bot_logging(bot, log_from, "Warning: Couldn't load any %s dict files" % (configtypename))
|
||||||
|
|
||||||
return configs_dict
|
return configs_dict
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user