mocktracer/mockspan.go
func (s *MockSpan) logFieldsWithTimestamp(ts time.Time, fields ...log.Field) {
	lr := MockLogRecord{
		Timestamp: ts,
		Fields:    make([]MockKeyValue, len(fields)),
	}
	for i, f := range fields {
		outField := &(lr.Fields[i])
		f.Marshal(outField)
	}

	s.Lock()
	defer s.Unlock()
	s.logs = append(s.logs, lr)
}
func (s *MockSpan) logFieldsWithTimestamp(ts time.Time, fields ...log.Field) {
	lr := MockLogRecord{
		Timestamp: ts,
		Fields:    make([]MockKeyValue, len(fields)),
	}
	for i, f := range fields {
		outField := &(lr.Fields[i])
		f.Marshal(outField)
	}

	s.Lock()
	defer s.Unlock()
	s.logs = append(s.logs, lr)
}
func ( s * MockSpan ) logFieldsWithTimestamp ( ts time . Time , fields ... log . Field ) { lr := MockLogRecord { Timestamp : ts , Fields : make ( [ ] MockKeyValue , len ( fields ) ) , } for i , f := range fields { outField := & ( lr . Fields [ i ] ) f . Marshal ( outField ) } s . Lock ( ) defer s . Unlock ( ) s . logs = append ( s . logs , lr ) }
// The caller MUST NOT hold s.Lock
The caller MUST NOT hold s . Lock