Switching non-TTY text formatter to use %q instead of '%v'

so that the output becomes l2met compatible yey!
This commit is contained in:
Dan Buch 2014-04-20 12:29:02 -04:00
parent 7344642b50
commit 79b3145302
1 changed files with 1 additions and 1 deletions

View File

@ -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))...)
}