MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / __init__

Method __init__

codeclash/utils/log.py:19–29  ·  view source on GitHub ↗
(self, console: Console | None = None, emoji: str = "")

Source from the content-addressed store, hash-verified

17 """Custom formatter that uses Rich for colorized output."""
18
19 def __init__(self, console: Console | None = None, emoji: str = ""):
20 super().__init__()
21 self.console = console or Console()
22 self.emoji = emoji + " " if emoji and not emoji.endswith(" ") else emoji
23 self.level_colors = {
24 logging.DEBUG: "dim cyan",
25 logging.INFO: "green",
26 logging.WARNING: "yellow",
27 logging.ERROR: "red",
28 logging.CRITICAL: "bold red",
29 }
30
31 def format(self, record: logging.LogRecord) -> str:
32 level_color = self.level_colors.get(record.levelno, "white")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected