diff --git a/yb-voyager/cmd/assessMigrationCommand.go b/yb-voyager/cmd/assessMigrationCommand.go index 905bac4fd..556ddb577 100644 --- a/yb-voyager/cmd/assessMigrationCommand.go +++ b/yb-voyager/cmd/assessMigrationCommand.go @@ -1607,7 +1607,7 @@ func generateAssessmentReportJson(reportDir string) error { if err != nil { return fmt.Errorf("unable to build migration complexity explanation for json report: %w", err) } - log.Info(assessmentReport.MigrationComplexityExplanation) + log.Infof("migration complexity explanation: %q", assessmentReport.MigrationComplexityExplanation) strReport, err := json.MarshalIndent(assessmentReport, "", "\t") if err != nil { diff --git a/yb-voyager/cmd/templates/migration_assessment_report.template b/yb-voyager/cmd/templates/migration_assessment_report.template index 9f4f4a97a..894ba5121 100644 --- a/yb-voyager/cmd/templates/migration_assessment_report.template +++ b/yb-voyager/cmd/templates/migration_assessment_report.template @@ -272,7 +272,7 @@ {{ end }} {{end}} - {{if ne .MigrationComplexity "NOT AVAILABLE"}} + {{if and (ne .MigrationComplexity "NOT AVAILABLE") (ne (len .MigrationComplexityExplanation) 0)}}
{{ .MigrationComplexityExplanation }}
{{end}}