Skip to content

Commit 979423d

Browse files
committed
Use GitHub Workflow commands for logs
Changed the format for logs and dropped the color coding
1 parent 69ed2de commit 979423d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

normalize_repos/log.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ class IndentFormatter(logging.Formatter):
1313
indentation using ``'\t'`` characters.
1414
"""
1515

16-
color_map = {
17-
logging.CRITICAL: 31, # red
18-
logging.ERROR: 31, # red
19-
logging.WARNING: 33, # yellow
20-
SUCCESS: 32, # green
21-
logging.INFO: 34, # blue
22-
}
23-
2416
@staticmethod
2517
def identify_cut(filenames):
2618
"""
@@ -59,12 +51,10 @@ def update_format(self, record):
5951
"""
6052

6153
prefix = "\u001b["
62-
color = f"{self.color_map[record.levelno]}m"
6354
bold = "1m"
6455
reset = "0m"
6556
self._style._fmt = (
66-
"%(asctime)s │ "
67-
f"{prefix}{color}%(levelname)-8s{prefix}{reset} │ "
57+
"::%(levelname)-8s:: %(asctime)s │ "
6858
f"%(indent)s{prefix}{bold}%(function)s{prefix}{reset}: "
6959
"%(message)s"
7060
)

0 commit comments

Comments
 (0)