diff --git a/pkg/output/output.go b/pkg/output/output.go index 84201c0d73..dbc0a21060 100644 --- a/pkg/output/output.go +++ b/pkg/output/output.go @@ -512,6 +512,13 @@ func sanitizeFileName(fileName string) string { } func (w *StandardWriter) WriteStoreDebugData(host, templateID, eventType string, data string) { if w.storeResponse { + if len(host) > 60 { + host = host[:57] + "..." + } + if len(templateID) > 100 { + templateID = templateID[:97] + "..." + } + filename := sanitizeFileName(fmt.Sprintf("%s_%s", host, templateID)) subFolder := filepath.Join(w.storeResponseDir, sanitizeFileName(eventType)) if !fileutil.FolderExists(subFolder) { @@ -526,7 +533,6 @@ func (w *StandardWriter) WriteStoreDebugData(host, templateID, eventType string, _, _ = f.WriteString(fmt.Sprintln(data)) f.Close() } - } // tryParseCause tries to parse the cause of given error