Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protect sensitive config value #69

Merged
merged 1 commit into from
May 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions archaius.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@ func CustomInit(sources ...core.ConfigSource) error {
return err
}
}

eventHandler := EventListener{
Name: "EventHandler",
Factory: factory,
}

factory.RegisterListener(eventHandler, "a*")

return err
}

Expand All @@ -150,7 +142,7 @@ func EnableConfigCenterSource(ci ConfigCenterInfo, cc config.Client) error {
return errors.New("ConfigCenterInfo can not be empty")
}
if configServerRunning {
openlogging.Debug("can not init config server again, call Clean first")
openlogging.Warn("can not init config server again, call Clean first")
return nil
}

Expand Down Expand Up @@ -178,13 +170,6 @@ func EnableConfigCenterSource(ci ConfigCenterInfo, cc config.Client) error {
if err != nil {
return err
}

eventHandler := EventListener{
Name: "EventHandler",
Factory: factory,
}

factory.RegisterListener(eventHandler, "a*")
configServerRunning = true
return nil
}
Expand All @@ -198,7 +183,7 @@ type EventListener struct {
// Event is invoked while generating events at run time
func (e EventListener) Event(event *core.Event) {
value := e.Factory.GetConfigurationByKey(event.Key)
openlogging.GetLogger().Infof("config value after change %s | %s", event.Key, value)
openlogging.GetLogger().Debugf("config value after change %s | %s", event.Key, value)
}

// Get is for to get the value of configuration key
Expand Down