From 353605d6720333a772af83b3568bff725de05dc2 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 4 Jul 2022 07:23:21 -0400 Subject: [PATCH] Island: Reorder components in log statement * Since file and function names differ wildly in length, moving the log leve right after the timestamps makes the log easier for a human being to parse. * The length of function names can vary wildly. The 10 character padding to attempt to align other parts of the log message just didn't achive its goal. It made the log harder to read and added a lot of dead space. --- monkey/monkey_island/cc/server_utils/island_logger.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/server_utils/island_logger.py b/monkey/monkey_island/cc/server_utils/island_logger.py index 06547d84d..bc94bb710 100644 --- a/monkey/monkey_island/cc/server_utils/island_logger.py +++ b/monkey/monkey_island/cc/server_utils/island_logger.py @@ -4,9 +4,7 @@ import os import sys ISLAND_LOG_FILENAME = "monkey_island.log" -LOG_FORMAT = ( - "%(asctime)s - %(filename)s:%(lineno)s - %(funcName)10s() - %(levelname)s - %(message)s" -) +LOG_FORMAT = "%(asctime)s - %(levelname)s - %(filename)s:%(lineno)s - %(funcName)s() - %(message)s" FILE_MAX_BYTES = 10485760 FILE_BACKUP_COUNT = 20 FILE_ENCODING = "utf8"