Skip to content

Commit

Permalink
pretify moc version message (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpdnju authored Apr 10, 2024
1 parent a2514ca commit 12d2fbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cloud/services/versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type VersionPair struct {
func (s *Service) Get(ctx context.Context) (*VersionPair, error) {
version, mocversion, err := s.Client.GetVersion(ctx)
if err != nil {
s.Scope.GetLogger().Error(err, "Unable to get moc deployment id")
s.Scope.GetLogger().Error(err, "Unable to get moc version")
return nil, err
}
return &VersionPair{
Expand Down
9 changes: 2 additions & 7 deletions cloud/telemetry/logutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package telemetry

import (
"context"
"encoding/json"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -130,12 +129,8 @@ func WriteMocInfoLog(ctx context.Context, scope scope.ScopeInterface) {
WssdCloudAgentVersion: wssdCloudAgentVersion,
MocVersion: mocVersion,
}
jsonData, err := json.Marshal(infoLog)
if err != nil {
logger.Error(err, "Unable to serialize moc info log object.")
} else {
logger.Info(string(jsonData))
}

logger.Info("Record Moc Info", "mocInfo", infoLog)
}

func getVersionsService(scope scope.ScopeInterface) *versions.Service {
Expand Down

0 comments on commit 12d2fbe

Please sign in to comment.