Switching non-TTY text formatter to use %q instead of '%v'
so that the output becomes l2met compatible yey!
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
|||||||
|
|
||||||
func (f *TextFormatter) AppendKeyValue(serialized []byte, key, value interface{}) []byte {
|
func (f *TextFormatter) AppendKeyValue(serialized []byte, key, value interface{}) []byte {
|
||||||
if _, ok := value.(string); ok {
|
if _, ok := value.(string); ok {
|
||||||
return append(serialized, []byte(fmt.Sprintf("%v='%v' ", key, value))...)
|
return append(serialized, []byte(fmt.Sprintf("%v=%q ", key, value))...)
|
||||||
} else {
|
} else {
|
||||||
return append(serialized, []byte(fmt.Sprintf("%v=%v ", key, value))...)
|
return append(serialized, []byte(fmt.Sprintf("%v=%v ", key, value))...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user