MCPcopy Create free account
hub / github.com/1rgs/claude-code-proxy / ColorizedFormatter

Class ColorizedFormatter

server.py:62–76  ·  view source on GitHub ↗

Custom formatter to highlight model mappings

Source from the content-addressed store, hash-verified

60
61# Custom formatter for model mapping logs
62class ColorizedFormatter(logging.Formatter):
63 """Custom formatter to highlight model mappings"""
64
65 BLUE = "\033[94m"
66 GREEN = "\033[92m"
67 YELLOW = "\033[93m"
68 RED = "\033[91m"
69 RESET = "\033[0m"
70 BOLD = "\033[1m"
71
72 def format(self, record):
73 if record.levelno == logging.debug and "MODEL MAPPING" in record.msg:
74 # Apply colors and formatting to model mapping logs
75 return f"{self.BOLD}{self.GREEN}{record.msg}{self.RESET}"
76 return super().format(record)
77
78
79# Apply custom formatter to console handler

Callers 1

server.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected