From 1c1ab07d79bfda95669512cbe044a9fb101ea288 Mon Sep 17 00:00:00 2001 From: nikitapoly Date: Thu, 22 Jun 2023 17:12:54 -0700 Subject: [PATCH] typo --- src/mantarray_desktop_app/main.py | 1 + src/mantarray_desktop_app/utils/log_formatter.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mantarray_desktop_app/main.py b/src/mantarray_desktop_app/main.py index a9d16bbc..37441282 100644 --- a/src/mantarray_desktop_app/main.py +++ b/src/mantarray_desktop_app/main.py @@ -137,6 +137,7 @@ def main(command_line_args: List[str], object_access_for_testing: Optional[Dict[ try: # Tanner (5/20/22): not sure if this is actually logging anything since logging isn't configured yet logger.info(command_line_args) + log_level = logging.INFO parser = argparse.ArgumentParser() parser.add_argument( diff --git a/src/mantarray_desktop_app/utils/log_formatter.py b/src/mantarray_desktop_app/utils/log_formatter.py index 02a34437..739e1f86 100644 --- a/src/mantarray_desktop_app/utils/log_formatter.py +++ b/src/mantarray_desktop_app/utils/log_formatter.py @@ -15,12 +15,12 @@ class SensitiveFormatter(logging.Formatter): @staticmethod def _filter(log_msg: str) -> Any: - if "/system_status" in log_msg: - parts = log_msg.split() - status_code_position = parts.index('HTTP/1.1"') + 1 - status_code = parts[status_code_position] - return status_code != "200" - elif "/update_settings" not in log_msg: + # if "/system_status" in log_msg: + # parts = log_msg.split() + # status_code_position = parts.index('HTTP/1.1"') + 1 + # status_code = parts[status_code_position] + # return status_code != "200" + if "/update_settings" not in log_msg: return re.sub( r"(.*set_mantarray_nickname\?nickname=)(.*)( HTTP.*)", lambda match_obj: match_obj[1] + get_redacted_string(len(match_obj[2])) + match_obj[3],