MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / dumpCrash

Method dumpCrash

cmd/crowdsec-cli/clisupport/support.go:439–452  ·  view source on GitHub ↗
(zw *zip.Writer)

Source from the content-addressed store, hash-verified

437}
438
439func (cli *cliSupport) dumpCrash(zw *zip.Writer) error {
440 fmt.Fprintln(os.Stdout, "Collecting crash dumps")
441
442 traceFiles, err := trace.List()
443 if err != nil {
444 return fmt.Errorf("could not list crash dumps: %w", err)
445 }
446
447 for _, filename := range traceFiles {
448 cli.writeFileToZip(zw, SUPPORT_CRASH_DIR+filepath.Base(filename), filename)
449 }
450
451 return nil
452}
453
454func New(cfg csconfig.Getter) *cliSupport {
455 return &cliSupport{

Callers 1

dumpMethod · 0.95

Calls 2

writeFileToZipMethod · 0.95
ListMethod · 0.45

Tested by

no test coverage detected