Merge pull request #124 from NebulousLabs/check-logs-for-panic

Check logs for panics
This commit is contained in:
Marcin Jachymiak 2020-03-24 13:29:57 -04:00 committed by GitHub
commit c0e148908e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ async def check_journal():
return return
# If there are any critical errors. upload the whole log file. # If there are any critical errors. upload the whole log file.
if "Critical" in std_out: if "Critical" or "panic" in std_out:
upload_name = "{}-{}-{}-{}-{}:{}:{}.log".format(service_name, time.year, time.month, time.day, time.hour, time.minute, time.second) upload_name = "{}-{}-{}-{}-{}:{}:{}.log".format(service_name, time.year, time.month, time.day, time.hour, time.minute, time.second)
await send_msg(client, "Critical error found in log!", file=discord.File(io.BytesIO(std_out.encode()), filename=upload_name), force_notify=True) await send_msg(client, "Critical error found in log!", file=discord.File(io.BytesIO(std_out.encode()), filename=upload_name), force_notify=True)
return return