mirror of https://github.com/milvus-io/milvus.git
[skip e2e] Add comment for base table (#14723)
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>pull/14750/head
parent
fc415c0fb5
commit
b6b62c025e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue