Skip to content

Commit

Permalink
fix: use Sprintf to format metrics for log
Browse files Browse the repository at this point in the history
zerolog escapes quotes within message

fixes akash-network/support#101

Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Jun 21, 2023
1 parent 461b991 commit 99e6d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ loop:
if fetchCount%is.config.InventoryResourceDebugFrequency == 0 {
data, err := json.Marshal(&metrics)
if err == nil {
is.log.Debug("cluster resources", "dump", data)
is.log.Debug(fmt.Sprintf("cluster resources dump=%s", string(data)))
} else {
is.log.Error("unable to dump cluster inventory", "error", err.Error())
}
Expand Down

0 comments on commit 99e6d87

Please sign in to comment.