소스 검색

Use default formatting for NoticeCommonLogger log fields

- E.g., emit a string as "string" instead of "\"string\""
Rod Hynes 5 년 전
부모
커밋
bb76ca37ef
1개의 변경된 파일1개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 7
      psiphon/notice.go

+ 1 - 7
psiphon/notice.go

@@ -1103,13 +1103,7 @@ func (logger *commonLogger) LogMetric(metric string, fields common.LogFields) {
 func listCommonFields(fields common.LogFields) []interface{} {
 	fieldList := make([]interface{}, 0)
 	for name, value := range fields {
-		var formattedValue string
-		if err, ok := value.(error); ok {
-			formattedValue = err.Error()
-		} else {
-			formattedValue = fmt.Sprintf("%#v", value)
-		}
-		fieldList = append(fieldList, name, formattedValue)
+		fieldList = append(fieldList, name, value)
 	}
 	return fieldList
 }