Skip to content

Commit

Permalink
Disable pretty formatting and newline (resolves #202)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nauman-S committed Dec 30, 2024
1 parent 3fcdd13 commit 92ac9e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions turbo/logging/oklogformat.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ func OkLogV1Format(r *log.Record) []byte {
props[k] = formatJSONValue(r.Ctx[i+1])
}

b, err := json.MarshalIndent(props, "", " ")
b, err := json.Marshal(props)
if err != nil {
b, _ = json.MarshalIndent(map[string]string{
b, _ = json.Marshal(map[string]string{
errorKey: err.Error(),
}, "", " ")
})
return b
}

b = append(b, '\n')

return b
}

Expand Down

0 comments on commit 92ac9e4

Please sign in to comment.