MCPcopy
hub / github.com/crowdsecurity/crowdsec / cleanTextForDebug

Function cleanTextForDebug

pkg/exprhelpers/debugger.go:451–456  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

449}
450
451func cleanTextForDebug(text string) string {
452 text = strings.Join(strings.Fields(text), " ")
453 text = strings.Trim(text, " \t\n")
454
455 return text
456}
457
458func DisplayExprDebug(program *vm.Program, outputs []OpOutput, logger *log.Entry, ret any) {
459 logger.Debugf("dbg(result=%v): %s", ret, cleanTextForDebug(program.Source().String()))

Callers 2

extractCodeMethod · 0.85
DisplayExprDebugFunction · 0.85

Calls 1

FieldsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…