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

Function DisplayExprDebug

pkg/exprhelpers/debugger.go:458–464  ·  view source on GitHub ↗
(program *vm.Program, outputs []OpOutput, logger *log.Entry, ret any)

Source from the content-addressed store, hash-verified

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()))
460
461 for _, output := range outputs {
462 logger.Debugf("%s", output.String())
463 }
464}
465
466// TBD: Based on the level of the logger (ie. trace vs debug) we could decide to add more low level instructions (pop, push, etc.)
467func RunWithDebug(program *vm.Program, env any, logger *log.Entry) ([]OpOutput, any, error) {

Callers 2

TestBaseDbgFunction · 0.85
RunFunction · 0.85

Calls 2

cleanTextForDebugFunction · 0.85
StringMethod · 0.45

Tested by 1

TestBaseDbgFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…