Hi! I am trying to use cockroachdb/errors package with zerolog. I want to make multiline, readable, verbose stack trace output at the end of log message for local development. Any ideas of better implementation? Current is annoying couse of hard coded internal formatting values (colorization). I faced core problem in string quotating code that ruin line breaks and I see no possibility too use FormatFieldValue here.
String quotation code:
case string:
if needsQuote(fValue) {
buf.WriteString(fv(strconv.Quote(fValue)))
} else {
buf.WriteString(fv(fValue))
}
Hi! I am trying to use cockroachdb/errors package with zerolog. I want to make multiline, readable, verbose stack trace output at the end of log message for local development. Any ideas of better implementation? Current is annoying couse of hard coded internal formatting values (colorization). I faced core problem in string quotating code that ruin line breaks and I see no possibility too use FormatFieldValue here. String quotation code:
Expected result:
Implementation: