MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / format

Method format

run_system.py:71–83  ·  view source on GitHub ↗
(self, record)

Source from the content-addressed store, hash-verified

69 RESET = '\033[0m'
70
71 def format(self, record):
72 # Add service-specific coloring
73 service_name = getattr(record, 'service', 'system')
74 service_color = self.SERVICE_COLORS.get(service_name, self.COLORS.get(record.levelname, ''))
75
76 # Format timestamp
77 timestamp = datetime.fromtimestamp(record.created).strftime('%H:%M:%S')
78
79 # Create colored log line
80 colored_service = f"{service_color}[{service_name.upper()}]{self.RESET}"
81 colored_level = f"{self.COLORS.get(record.levelname, '')}{record.levelname}{self.RESET}"
82
83 return f"{timestamp} {colored_service} {colored_level}: {record.getMessage()}"
84
85class ServiceManager:
86 """Manages multiple system services with logging and health monitoring."""

Callers 3

build_and_storeMethod · 0.80
_generate_summaryMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected