MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / truncateForLog

Function truncateForLog

pkg/lsp/handler.go:1693–1700  ·  view source on GitHub ↗

truncateForLog truncates raw JSON for logging purposes to avoid overly verbose logs

(data json.RawMessage)

Source from the content-addressed store, hash-verified

1691
1692// truncateForLog truncates raw JSON for logging purposes to avoid overly verbose logs
1693func truncateForLog(data json.RawMessage) string {
1694 const maxLen = 200
1695 s := string(data)
1696 if len(s) > maxLen {
1697 return s[:maxLen] + "..."
1698 }
1699 return s
1700}
1701
1702// handleSemanticTokensFull handles textDocument/semanticTokens/full requests.
1703// It tokenizes the document and returns LSP-encoded semantic token data.

Callers 4

handleDidOpenMethod · 0.85
handleDidChangeMethod · 0.85
handleDidCloseMethod · 0.85
handleDidSaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected