Closed bmccool closed 11 months ago
# Rotating file handler for debug messages
debug_file_handler = RotatingFileHandler(
filename=f'Logs/Debug/{info.app_name}_debug.log',
maxBytes=1000000,
backupCount=100,
encoding='utf-8')
debug_file_handler.setLevel(logging.DEBUG)
debug_file_handler.setFormatter(formatter)
# Rotating file handler for info messages
info_file_handler = RotatingFileHandler(
filename=f'Logs/Info/{info.app_name}_info.log',
maxBytes=1000000,
backupCount=100,
encoding='utf-8')
info_file_handler.setLevel(logging.INFO)
info_file_handler.setFormatter(formatter)
Attempting to log a unicode character gives error:
This can be fixed by adding utf-8 encoding to the file handlers. But unicode shouild be added as a unit test as well.