未验证 提交 b6b62c02 编写于 作者: S shaoyue 提交者: GitHub

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

Signed-off-by: Nshaoyue.chen <shaoyue.chen@zilliz.com>
上级 fc415c0f
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册