diff --git a/main.go b/main.go index 67f644e..8c9434e 100644 --- a/main.go +++ b/main.go @@ -171,12 +171,11 @@ func watch(filePath string) { slog.Error("Error scanning file", "error", err.Error(), "filePath", filePath) return } - slog.Info("Error count", "count", result.ErrorCount) - slog.Info("1st line", "date", result.FirstDate, "line", pkg.Truncate(result.FirstLine, pkg.TruncateMax)) slog.Info("Preview line", "line", pkg.Truncate(result.PreviewLine, pkg.TruncateMax)) slog.Info("Last line", "date", result.LastDate, "line", pkg.Truncate(result.LastLine, pkg.TruncateMax)) - slog.Info("Error percent", "percent", fmt.Sprintf("%.2f", result.ErrorPercent)+"%") + slog.Info("Error count", "percent", fmt.Sprintf("%d (%.2f)", result.ErrorCount, result.ErrorPercent)+"%") + slog.Info("Lines read", "count", result.LinesRead) slog.Info("Scanning complete", "filePath", result.FilePath) diff --git a/pkg/card.go b/pkg/card.go index c140270..533ec68 100644 --- a/pkg/card.go +++ b/pkg/card.go @@ -104,7 +104,7 @@ func GetAlertDetails(f *Flags, version string, result *ScanResult) []gmt.Details }, { Label: "Total Errors Found", - Message: fmt.Sprintf("%d", result.ErrorCount), + Message: fmt.Sprintf("%d (%.2f)", result.ErrorCount, result.ErrorPercent) + "%", }, { Label: "First Line", @@ -118,10 +118,6 @@ func GetAlertDetails(f *Flags, version string, result *ScanResult) []gmt.Details Label: "Last Line", Message: Truncate(result.LastLine, TruncateMax), }, - { - Label: "Error Percentage", - Message: fmt.Sprintf("%.2f", result.ErrorPercent) + "%", - }, } if result.FirstDate != "" || result.LastDate != "" { details = append(details, gmt.Details{