app/vmauth: log when -auth.config is reloaded in SIGHUP

This commit is contained in:
Aliaksandr Valialkin 2020-06-03 23:22:09 +03:00
parent 730e4a719f
commit faea804b88

View file

@ -63,12 +63,14 @@ func authConfigReloader() {
case <-stopCh: case <-stopCh:
return return
case <-sighupCh: case <-sighupCh:
logger.Infof("SIGHUP received; loading -auth.config=%q", *authConfigPath)
m, err := readAuthConfig(*authConfigPath) m, err := readAuthConfig(*authConfigPath)
if err != nil { if err != nil {
logger.Errorf("failed to load auth config; using the last successfully loaded config; error: %s", err) logger.Errorf("failed to load -auth.config=%q; using the last successfully loaded config; error: %s", *authConfigPath, err)
continue continue
} }
authConfig.Store(m) authConfig.Store(m)
logger.Infof("Successfully reloaded -auth.config=%q", *authConfigPath)
} }
} }
} }