func FormatFieldsToText(src map[string]interface{}) string {
	texts := make([]string, 0, len(src))
	for k, v := range src {
		switch o := v.(type) {
		case []byte:
			texts = append(texts, k+"="+string(o))
		default:
			texts = append(texts, k+"="+fmt.Sprint(v))
		}
	}
	if len(texts) > 1 {
		sort.Strings(texts)
	}
	return strings.Join(texts, ", ")
}
FormatFieldsToText standardizes the given log fields.
package internal
import (
	"fmt"
	"sort"
	"strings"
)
type Fields map[string]interface{}
func MakeFields(src map[string]interface{}) Fields {
	r := make(Fields, len(src))
	for k, v := range src {
		r[k] = v
	}
	return r
}
func (fs Fields) Clone(n int) Fields {
	if len(fs) == 0 {
		return make(Fields, n)
	}
	r := make(Fields, len(fs)+n)
	for k, v := range fs {
		r[k] = v
	}
	return r
}
func (fs Fields) With(src map[string]interface{}) Fields {
	if len(src) == 0 {
		return fs.Clone(0)
	}
	r := fs.Clone(len(src))
	for k, v := range src {
		r[k] = v
	}
	return r
}
func StandardiseFieldsForJSONEncoder(src map[string]interface{}) map[string]interface{} {
	dst := make(map[string]interface{}, len(src))
	for k, v := range src {
		switch o := v.(type) {
		case error:
			dst[k] = o.Error()
		default:
			dst[k] = v
		}
	}
	return dst
}