MCPcopy Create free account
hub / github.com/diillson/chatcli / mcpLogs

Method mcpLogs

cli/mcp_command.go:332–355  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

330}
331
332func (cli *ChatCLI) mcpLogs(name string) {
333 if name == "" {
334 fmt.Println(colorize(" "+i18n.T("mcp.cmd.usage_logs"), ColorYellow))
335 return
336 }
337 if !cli.mcpServerExists(name) {
338 fmt.Println(colorize(" "+i18n.T("mcp.cmd.unknown_server", name), ColorRed))
339 return
340 }
341 lines := cli.mcpManager.RecentLogs(name)
342 fmt.Println()
343 fmt.Println(uiBox("📜", i18n.T("mcp.cmd.box_logs_title", name), ColorCyan))
344 p := uiPrefix(ColorCyan)
345 if len(lines) == 0 {
346 fmt.Println(p + colorize(i18n.T("mcp.cmd.no_logs"), ColorGray))
347 fmt.Println(uiBoxEnd(ColorCyan))
348 return
349 }
350 for _, line := range lines {
351 fmt.Println(p + " " + line)
352 }
353 fmt.Println(uiBoxEnd(ColorCyan))
354 fmt.Println()
355}
356
357// mcpServerExists returns true when the named server is currently
358// configured (either running or stopped-but-known). Used to give a

Callers 4

handleMCPCommandMethod · 0.95
TestMcpLogsUnknownServerFunction · 0.80

Calls 7

mcpServerExistsMethod · 0.95
TFunction · 0.92
colorizeFunction · 0.85
uiBoxFunction · 0.85
uiPrefixFunction · 0.85
uiBoxEndFunction · 0.85
RecentLogsMethod · 0.80

Tested by 3

TestMcpLogsUnknownServerFunction · 0.64