// AddError add error to the db func(s *DB)AddError(err error)error { if err != nil { if err != ErrRecordNotFound { if s.logMode == defaultLogMode { go s.print("error", fileWithLineNum(), err) } else { s.log(err) }
// LogMode set log mode, `true` for detailed logs, `false` for no log, default, will only print error logs func(s *DB)LogMode(enable bool) *DB { if enable { s.logMode = detailedLogMode } else { s.logMode = noLogMode } return s }