Browse Source

Merge branch 'release/1.11.1'

liuyuqi-dellpc 2 months ago
parent
commit
6ef470988f
2 changed files with 4 additions and 1 deletions
  1. 2 0
      repo_sync/utils/logger.py
  2. 2 1
      requirements.txt

+ 2 - 0
repo_sync/utils/logger.py

@@ -4,6 +4,8 @@ from termcolor import colored
 class ColoredFormatter(logging.Formatter):
     def format(self, record):
         # 保留原始消息不变
+        import colorama
+        colorama.init()    # 解决windows cmd 颜色显示问题
         original_msg = record.msg
         if record.levelno == logging.DEBUG:
             record.msg = colored(record.msg, 'blue')

+ 2 - 1
requirements.txt

@@ -1,3 +1,4 @@
 requests==2.27.1
 python-dotenv==1.0.0
-termcolor==2.3.0
+termcolor==2.3.0
+colorama