[skip e2e] Add comment for base table (#14723)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/14750/head
shaoyue 2022-01-04 10:47:27 +08:00 committed by GitHub
parent fc415c0fb5
commit b6b62c025e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -425,6 +425,7 @@ func ConvertRangeToIntRange(rangeStr, sep string) []int {
return []int{start, end}
}
// ConvertRangeToIntSlice convert given @rangeStr & @sep to a slice of ints.
func ConvertRangeToIntSlice(rangeStr, sep string) []int {
rangeSlice := ConvertRangeToIntRange(rangeStr, sep)
start, end := rangeSlice[0], rangeSlice[1]
@ -435,6 +436,7 @@ func ConvertRangeToIntSlice(rangeStr, sep string) []int {
return ret
}
// InitLogCfg init log of the base table
func (gp *BaseTable) InitLogCfg() {
gp.Log = log.Config{}
format, err := gp.Load("log.format")
@ -452,6 +454,7 @@ func (gp *BaseTable) InitLogCfg() {
gp.Log.File.MaxDays = gp.ParseInt("log.file.maxAge")
}
// SetLogConfig set log config of the base table
func (gp *BaseTable) SetLogConfig() {
gp.LogCfgFunc = func(cfg log.Config) {
log.Info("Set log file to ", zap.String("path", cfg.File.Filename))
@ -460,6 +463,7 @@ func (gp *BaseTable) SetLogConfig() {
}
}
// SetLogger sets the logger file by given id
func (gp *BaseTable) SetLogger(id UniqueID) {
rootPath, err := gp.Load("log.file.rootPath")
if err != nil {