mirror of https://github.com/eyhc1/rendercv.git
fix colors in windows terminal
This commit is contained in:
parent
0e52756d17
commit
64089f2703
|
@ -6,6 +6,7 @@ $\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class LoggingFormatter(logging.Formatter):
|
class LoggingFormatter(logging.Formatter):
|
||||||
|
@ -33,7 +34,8 @@ class LoggingFormatter(logging.Formatter):
|
||||||
|
|
||||||
|
|
||||||
# Initialize logger with colors
|
# Initialize logger with colors
|
||||||
os.system("COLOR 0") # enable colors in Windows terminal
|
if sys.platform == "win32":
|
||||||
|
os.system("COLOR 0") # enable colors in Windows terminal
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
stdout_handler = logging.StreamHandler()
|
stdout_handler = logging.StreamHandler()
|
||||||
|
|
Loading…
Reference in New Issue