mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmauth: log when -auth.config is reloaded in SIGHUP
This commit is contained in:
parent
730e4a719f
commit
faea804b88
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue