func (rec Record) Validate() error {
	if err := rec.Origin.Validate(); err != nil {
		return errors.Annotate(err, "invalid Origin")
	}

	if rec.Timestamp.IsZero() {
		return errors.NewNotValid(nil, "empty Timestamp")
	}

	// rec.Level may be anything, so we don't check it.

	if err := rec.Location.Validate(); err != nil {
		return errors.Annotate(err, "invalid Location")
	}

	// rec.Message may be anything, so we don't check it.

	return nil
}
// Validate ensures that the record is correct.
Validate ensures that the record is correct.
// Validate ensures that the record is correct .
func (rec Record) Validate() error {
	if err := rec.Origin.Validate(); err != nil {
		return errors.Annotate(err, "invalid Origin")
	}
	if rec.Timestamp.IsZero() {
		return errors.NewNotValid(nil, "empty Timestamp")
	}
	if err := rec.Location.Validate(); err != nil {
		return errors.Annotate(err, "invalid Location")
	}
	return nil
}
func ( rec Record ) Validate ( ) error { if err := rec . Origin . Validate ( ) ; err != nil { return errors . Annotate ( err , " " ) } if rec . Timestamp . IsZero ( ) { return errors . NewNotValid ( nil , " " ) } if err := rec . Location . Validate ( ) ; err != nil { return errors . Annotate ( err , " " ) } return nil }
Validate ensures that the record is correct.
Validate ensures that the record is correct .
// rec.Level may be anything, so we don't check it. // rec.Message may be anything, so we don't check it.