diff --git a/logging_config.py b/logging_config.py index 9017139..722b295 100644 --- a/logging_config.py +++ b/logging_config.py @@ -1,5 +1,10 @@ import logging import logging.handlers +import sys + + +sys.stdin.reconfigure(encoding='utf-8') +sys.stdout.reconfigure(encoding='utf-8') def setup_logging(name): @@ -12,9 +17,7 @@ def setup_logging(name): file_handler = logging.FileHandler( filename=f"{name}.log", mode='w', - encoding="UTF-8" - #maxBytes=1024*1024, - #backupCount=5 + encoding='utf-8' ) file_handler.setLevel(logging.DEBUG) diff --git a/mapping.py b/mapping.py index 0d85981..2958d74 100644 --- a/mapping.py +++ b/mapping.py @@ -2,13 +2,10 @@ import csv import json import os import sys -# import logging import requests -# logging.basicConfig(level=logging.DEBUG, filename='mapping.log', filemode='w') - from logging_config import setup_logging logger = setup_logging(__name__) @@ -108,11 +105,7 @@ def create_tasks_in_tracker(data): 'createdBy': 'dr.cyrill', 'deadline': task['deadline'], 'assignee': ya_assignee, - # 'milestone': task['milestone'], - # 'memberships': task['memberships'], - # 'parent': task['parent'], 'status': task['status'], - # 'completedAt': task['completedAt'] } logger.debug('Request: %s', json.dumps(payload))