From 771b9e05c22bc247b0b24b54091e0a33926db68e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 14 Jul 2022 10:43:45 -0400 Subject: [PATCH] Island: Add type hints to setup_logging() --- monkey/monkey_island/cc/server_utils/island_logger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/server_utils/island_logger.py b/monkey/monkey_island/cc/server_utils/island_logger.py index afdc68ae8..d3de14794 100644 --- a/monkey/monkey_island/cc/server_utils/island_logger.py +++ b/monkey/monkey_island/cc/server_utils/island_logger.py @@ -1,6 +1,7 @@ import logging import logging.handlers import sys +from pathlib import Path ISLAND_LOG_FILENAME = "monkey_island.log" LOG_FORMAT = "%(asctime)s - %(levelname)s - %(filename)s:%(lineno)s - %(funcName)s() - %(message)s" @@ -9,7 +10,7 @@ FILE_BACKUP_COUNT = 20 FILE_ENCODING = "utf8" -def setup_logging(data_dir, log_level): +def setup_logging(data_dir: Path, log_level: str): """ Setup the logging configuration :param data_dir: data directory file path