config: log config source changes (#1959)

* config: log config source changes

* use internal log import
This commit is contained in:
Caleb Doxsey 2021-03-03 09:54:08 -07:00 committed by GitHub
parent 664358dfad
commit f396c2a0f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 42 additions and 56 deletions

View file

@ -84,7 +84,6 @@ func newPolicyEvaluator(opts *config.Options, store *evaluator.Store) (*evaluato
// OnConfigChange updates internal structures based on config.Options
func (a *Authorize) OnConfigChange(cfg *config.Config) {
log.Info().Str("checksum", fmt.Sprintf("%x", cfg.Options.Checksum())).Msg("authorize: updating options")
a.currentOptions.Store(cfg.Options)
if state, err := newAuthorizeStateFromConfig(cfg, a.store); err != nil {
log.Error().Err(err).Msg("authorize: error updating state")