fix colors in windows terminal

This commit is contained in:
Sina Atalay 2023-10-20 20:58:36 +02:00
parent 0e52756d17
commit 64089f2703
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ $\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
"""
import logging
import os
import sys
class LoggingFormatter(logging.Formatter):
@ -33,6 +34,7 @@ class LoggingFormatter(logging.Formatter):
# Initialize logger with colors
if sys.platform == "win32":
os.system("COLOR 0") # enable colors in Windows terminal
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)