MCPcopy Create free account
hub / github.com/bytebase/bytebase / excerptForDebug

Function excerptForDebug

backend/plugin/parser/tidb/dispatcher.go:190–195  ·  view source on GitHub ↗

excerptForDebug truncates s for slog.Debug payloads. Keeps fallback log lines compact even when statement text runs long.

(s string, maxRunes int)

Source from the content-addressed store, hash-verified

188// excerptForDebug truncates s for slog.Debug payloads. Keeps fallback log
189// lines compact even when statement text runs long.
190func excerptForDebug(s string, maxRunes int) string {
191 if len(s) <= maxRunes {
192 return s
193 }
194 return s[:maxRunes] + "..."
195}

Callers 1

parseTiDBStatementsOmniFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected