Skip to content

Commit

Permalink
Merge pull request #446 from devhindo/fixLogging
Browse files Browse the repository at this point in the history
Refine summary messages for Kuma service mesh operations
  • Loading branch information
leecalcote authored Dec 13, 2024
2 parents d1a6b97 + 40a99af commit 87cc418
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions kuma/kuma.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
hh.streamErr(summary, ee, err)
return
}
ee.Summary = fmt.Sprintf("Kuma service mesh %s successfully", stat)
ee.Summary = fmt.Sprintf("Kuma service mesh %s.", stat)
ee.Details = fmt.Sprintf("The Kuma service mesh is now %s.", stat)
hh.StreamInfo(ee)
}(kuma, e)
Expand All @@ -79,7 +79,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
hh.streamErr(summary, ee, err)
return
}
ee.Summary = fmt.Sprintf("%s application %s successfully", appName, stat)
ee.Summary = fmt.Sprintf("%s application %s", appName, stat)
ee.Details = fmt.Sprintf("The %s application is now %s.", appName, stat)
hh.StreamInfo(ee)
}(kuma, e)
Expand All @@ -102,7 +102,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
hh.streamErr(summary, ee, err)
return
}
ee.Summary = "SMI conformance passed successfully"
ee.Summary = "SMI conformance passed"
ee.Details = ""
hh.StreamInfo(ee)
}(kuma, e)
Expand All @@ -114,7 +114,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
hh.streamErr(summary, ee, err)
return
}
ee.Summary = fmt.Sprintf("Manifest %s successfully", status.Deployed)
ee.Summary = fmt.Sprintf("Manifest status is: %s", status.Deployed)
ee.Details = ""
hh.StreamInfo(ee)
}(kuma, e)
Expand Down
4 changes: 2 additions & 2 deletions kuma/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (kuma *Kuma) HandleComponents(comps []v1alpha1.Component, isDel bool, kubec
errs = append(errs, err)
continue
}
ee.Summary = fmt.Sprintf("%s %s successfully", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
ee.Summary = fmt.Sprintf("%s %s.", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
ee.Details = fmt.Sprintf("The %s is now %s.", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
kuma.StreamInfo(ee)
msgs = append(msgs, msg)
Expand All @@ -56,7 +56,7 @@ func (kuma *Kuma) HandleComponents(comps []v1alpha1.Component, isDel bool, kubec
errs = append(errs, err)
continue
}
ee.Summary = fmt.Sprintf("%s %s %s successfully", comp.Name, comp.Spec.Type, stat2)
ee.Summary = fmt.Sprintf("%s %s %s.", comp.Name, comp.Spec.Type, stat2)
ee.Details = fmt.Sprintf("The %s %s is now %s.", comp.Name, comp.Spec.Type, stat2)
kuma.StreamInfo(ee)
msgs = append(msgs, msg)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ func registerWorkloads(port string, log logger.Handler) {
log.Info(err.Error())
return
}
log.Info("Successfully registered latest service mesh components with Meshery Server at ", mesheryServerAddress())
log.Info("Registered latest service mesh components with Meshery Server at ", mesheryServerAddress())
}

0 comments on commit 87cc418

Please sign in to comment.