Skip to content

Commit 3ac55a8

Browse files
committed
remove api logging format
1 parent a123e43 commit 3ac55a8

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/attackmate/logging_setup.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
JSON_LOG_FILE = 'attackmate.json'
1111

1212
PLAYBOOK_CONSOLE_FORMAT = ' %(asctime)s %(log_color)s%(levelname)-8s%(reset)s | %(log_color)s%(message)s%(reset)s'
13-
API_CONSOLE_FORMAT = ' %(asctime)s %(log_color)s%(levelname)-8s%(reset)s | API | %(log_color)s%(message)s%(reset)s'
1413
DEFAULT_FILE_FORMAT = '%(asctime)s %(levelname)s - %(message)s'
1514
OUTPUT_FILE_FORMAT = '--- %(asctime)s %(levelname)s: ---\n\n%(message)s'
1615

@@ -55,28 +54,6 @@ def initialize_json_logger(json: bool, append_logs: bool):
5554
return json_logger
5655

5756

58-
def initialize_api_logger(debug: bool, append_logs: bool):
59-
api_logger = logging.getLogger('attackmate_api')
60-
api_logger.setLevel(logging.DEBUG if debug else logging.INFO)
61-
62-
# Console handler for API logs
63-
if not has_stdout_handler(api_logger):
64-
console_handler = logging.StreamHandler(sys.stdout)
65-
formatter = ColoredFormatter(API_CONSOLE_FORMAT, datefmt=DATE_FORMAT)
66-
console_handler.setFormatter(formatter)
67-
api_logger.addHandler(console_handler)
68-
69-
# File handler for API logs ?
70-
# api_file_formatter = logging.Formatter(API_CONSOLE_FORMAT, datefmt=DATE_FORMAT)
71-
# api_file_handler = create_file_handler('attackmate_api.log', append_logs, api_file_formatter)
72-
# api_logger.addHandler(api_file_handler)
73-
74-
# Prevent propagation to avoid duplicate logs if root logger also has handlers
75-
api_logger.propagate = False
76-
77-
return api_logger
78-
79-
8057
def create_file_handler(
8158
file_name: str, append_logs: bool, formatter: logging.Formatter
8259
) -> logging.FileHandler:

0 commit comments

Comments
 (0)