mirror of https://github.com/sirupsen/logrus.git
Switching non-TTY text formatter to use %q instead of '%v'
so that the output becomes l2met compatible yey!
This commit is contained in:
parent
7344642b50
commit
79b3145302
|
@ -74,7 +74,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
|||
|
||||
func (f *TextFormatter) AppendKeyValue(serialized []byte, key, value interface{}) []byte {
|
||||
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 {
|
||||
return append(serialized, []byte(fmt.Sprintf("%v=%v ", key, value))...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue