Skip to content

Commit 87cc418

Browse files
authored
Merge pull request #446 from devhindo/fixLogging
Refine summary messages for Kuma service mesh operations
2 parents d1a6b97 + 40a99af commit 87cc418

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

kuma/kuma.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
6666
hh.streamErr(summary, ee, err)
6767
return
6868
}
69-
ee.Summary = fmt.Sprintf("Kuma service mesh %s successfully", stat)
69+
ee.Summary = fmt.Sprintf("Kuma service mesh %s.", stat)
7070
ee.Details = fmt.Sprintf("The Kuma service mesh is now %s.", stat)
7171
hh.StreamInfo(ee)
7272
}(kuma, e)
@@ -79,7 +79,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
7979
hh.streamErr(summary, ee, err)
8080
return
8181
}
82-
ee.Summary = fmt.Sprintf("%s application %s successfully", appName, stat)
82+
ee.Summary = fmt.Sprintf("%s application %s", appName, stat)
8383
ee.Details = fmt.Sprintf("The %s application is now %s.", appName, stat)
8484
hh.StreamInfo(ee)
8585
}(kuma, e)
@@ -102,7 +102,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
102102
hh.streamErr(summary, ee, err)
103103
return
104104
}
105-
ee.Summary = "SMI conformance passed successfully"
105+
ee.Summary = "SMI conformance passed"
106106
ee.Details = ""
107107
hh.StreamInfo(ee)
108108
}(kuma, e)
@@ -114,7 +114,7 @@ func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationReq
114114
hh.streamErr(summary, ee, err)
115115
return
116116
}
117-
ee.Summary = fmt.Sprintf("Manifest %s successfully", status.Deployed)
117+
ee.Summary = fmt.Sprintf("Manifest status is: %s", status.Deployed)
118118
ee.Details = ""
119119
hh.StreamInfo(ee)
120120
}(kuma, e)

kuma/oam.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (kuma *Kuma) HandleComponents(comps []v1alpha1.Component, isDel bool, kubec
4343
errs = append(errs, err)
4444
continue
4545
}
46-
ee.Summary = fmt.Sprintf("%s %s successfully", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
46+
ee.Summary = fmt.Sprintf("%s %s.", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
4747
ee.Details = fmt.Sprintf("The %s is now %s.", strings.TrimSuffix(comp.Spec.Type, ".KUMA"), stat2)
4848
kuma.StreamInfo(ee)
4949
msgs = append(msgs, msg)
@@ -56,7 +56,7 @@ func (kuma *Kuma) HandleComponents(comps []v1alpha1.Component, isDel bool, kubec
5656
errs = append(errs, err)
5757
continue
5858
}
59-
ee.Summary = fmt.Sprintf("%s %s %s successfully", comp.Name, comp.Spec.Type, stat2)
59+
ee.Summary = fmt.Sprintf("%s %s %s.", comp.Name, comp.Spec.Type, stat2)
6060
ee.Details = fmt.Sprintf("The %s %s is now %s.", comp.Name, comp.Spec.Type, stat2)
6161
kuma.StreamInfo(ee)
6262
msgs = append(msgs, msg)

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ func registerWorkloads(port string, log logger.Handler) {
178178
log.Info(err.Error())
179179
return
180180
}
181-
log.Info("Successfully registered latest service mesh components with Meshery Server at ", mesheryServerAddress())
181+
log.Info("Registered latest service mesh components with Meshery Server at ", mesheryServerAddress())
182182
}

0 commit comments

Comments
 (0)