From a911b36f569f4c74621ba710f50f4f096b0e469e Mon Sep 17 00:00:00 2001 From: Matthew Sevey Date: Thu, 3 Sep 2020 10:50:43 -0400 Subject: [PATCH] Add severe check to log checker --- setup-scripts/log-checker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup-scripts/log-checker.py b/setup-scripts/log-checker.py index 6d6a32ad..95092201 100755 --- a/setup-scripts/log-checker.py +++ b/setup-scripts/log-checker.py @@ -101,16 +101,16 @@ async def check_docker_logs(): await send_msg(client, "Error(s) preview:\n{}".format(std_err), force_notify=True) return - # If there are any critical errors. upload the whole log file. - if 'Critical' in std_out or 'panic' in std_out: + # If there are any critical or severe errors. upload the whole log file. + if 'Critical' in std_out or 'Severe' in std_out or 'panic' in std_out: upload_name = "{}-{}-{}-{}-{}:{}:{}.log".format(container_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 or Severe error found in log!", file=discord.File(io.BytesIO(std_out.encode()), filename=upload_name), force_notify=True) return - # No critical errors, return a heartbeat type message + # No critical or severe errors, return a heartbeat type message pretty_before = time.strftime("%I:%M%p") pretty_now = now.strftime("%I:%M%p") - await send_msg(client, "No critical warnings in log from `{}` to `{}`".format(pretty_before, pretty_now)) + await send_msg(client, "No critical or severe warnings in log from `{}` to `{}`".format(pretty_before, pretty_now)) client.run(bot_token)