mirror of https://github.com/milvus-io/milvus.git
Only print the file content when log the hook.yaml (#22340)
Signed-off-by: SimFG <bang.fu@zilliz.com>pull/22340/merge
parent
40878a8656
commit
81f78142ee
|
@ -111,6 +111,19 @@ func (m *Manager) Configs() map[string]string {
|
|||
return config
|
||||
}
|
||||
|
||||
func (m *Manager) FileConfigs() map[string]string {
|
||||
m.RLock()
|
||||
defer m.RUnlock()
|
||||
config := make(map[string]string)
|
||||
for _, source := range m.sources {
|
||||
if s, ok := source.(*FileSource); ok {
|
||||
config, _ = s.GetConfigurations()
|
||||
break
|
||||
}
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
// For compatible reason, only visiable for Test
|
||||
func (m *Manager) SetConfig(key, value string) {
|
||||
m.Lock()
|
||||
|
|
|
@ -201,6 +201,10 @@ func (gp *BaseTable) Configs() map[string]string {
|
|||
return gp.mgr.Configs()
|
||||
}
|
||||
|
||||
func (gp *BaseTable) FileConfigs() map[string]string {
|
||||
return gp.mgr.FileConfigs()
|
||||
}
|
||||
|
||||
// Load loads an object with @key.
|
||||
func (gp *BaseTable) Load(key string) (string, error) {
|
||||
return gp.mgr.GetConfig(key)
|
||||
|
|
|
@ -16,7 +16,7 @@ type HookConfig struct {
|
|||
func (h *HookConfig) init() {
|
||||
h.Base = &BaseTable{YamlFile: hookYamlFile}
|
||||
h.Base.Init()
|
||||
log.Info("hook config", zap.Any("hook", h.Base.Configs()))
|
||||
log.Info("hook config", zap.Any("hook", h.Base.FileConfigs()))
|
||||
|
||||
h.initSoPath()
|
||||
h.initSoConfig()
|
||||
|
|
Loading…
Reference in New Issue