Skip to content

Commit

Permalink
save log file as utf-8 instead of ansi
Browse files Browse the repository at this point in the history
closes: #4
  • Loading branch information
niradar committed Jul 20, 2024
1 parent 0a5d0fb commit 99bd00a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duplicate_files_in_folders/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def setup_logging():

# Get the current time when the script starts
log_filename = os.path.join(logs_folder, f"log_{datetime.now().strftime('%Y%m%d_%H%M%S')}.txt")
file_handler = logging.FileHandler(log_filename)
file_handler = logging.FileHandler(log_filename, encoding='utf-8')
file_handler.setFormatter(formatter)
logger.addHandler(file_handler)

Expand Down

0 comments on commit 99bd00a

Please sign in to comment.