MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / parse_log_level

Method parse_log_level

trinity/manager/log_manager.py:144–150  ·  view source on GitHub ↗

Parse log level

(self, line: str)

Source from the content-addressed store, hash-verified

142 return lines
143
144 def parse_log_level(self, line: str) -> int:
145 """Parse log level"""
146 match = re.match(r"^(DEBUG|INFO|WARNING|WARN|ERROR|CRITICAL|FATAL)\b", line)
147 if match:
148 level = match.group(1).upper()
149 return LOG_LEVELS.get(level, -1)
150 return -1
151
152 def should_display(self, line: str) -> bool:
153 """Determine if this log line should be displayed"""

Callers 1

should_displayMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected