Skip to content

Commit

Permalink
Readd optinal trace condition to logObject
Browse files Browse the repository at this point in the history
  • Loading branch information
arp-est committed Feb 6, 2025
1 parent 422abe9 commit cf8fc8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/networkservice/core/trace/traceconcise/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func logError(ctx context.Context, err error, operation string) error {
}

func logObject(ctx context.Context, k, v interface{}) {
if !trace(ctx) {
return
}
s := log.FromContext(ctx)
msg := ""
cc, err := json.Marshal(v)
Expand Down
3 changes: 3 additions & 0 deletions pkg/registry/core/trace/traceconcise/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func logError(ctx context.Context, err error, operation string) error {
}

func logObject(ctx context.Context, k, v interface{}) {
if !trace(ctx) {
return
}
msg := ""
cc, err := json.Marshal(v)
if err == nil {
Expand Down

0 comments on commit cf8fc8e

Please sign in to comment.