mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 15:16:42 +00:00
app/vmauth: remove duplicate mentioning of -auth.config value in error message in logs on usuccessful load of -auth.config
This is a follow-up for 25759082f4
This commit is contained in:
parent
8cca9ed0d9
commit
2dcd754dc2
1 changed files with 5 additions and 6 deletions
|
@ -293,7 +293,7 @@ func initAuthConfig() {
|
|||
|
||||
err := loadAuthConfig()
|
||||
if err != nil {
|
||||
logger.Fatalf("cannot load auth config from `-auth.config=%s`: %s", *authConfigPath, err)
|
||||
logger.Fatalf("cannot load auth config: %s", err)
|
||||
}
|
||||
|
||||
stopCh = make(chan struct{})
|
||||
|
@ -328,10 +328,9 @@ func authConfigReloader(sighupCh <-chan os.Signal) {
|
|||
logger.Infof("SIGHUP received; loading -auth.config=%q", *authConfigPath)
|
||||
err := loadAuthConfig()
|
||||
if err != nil {
|
||||
logger.Errorf("failed to load -auth.config=%q; using the last successfully loaded config; error: %s", *authConfigPath, err)
|
||||
logger.Errorf("failed to load auth config; using the last successfully loaded config; error: %s", err)
|
||||
continue
|
||||
}
|
||||
logger.Infof("Successfully reloaded -auth.config=%q", *authConfigPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -344,14 +343,14 @@ var stopCh chan struct{}
|
|||
func loadAuthConfig() error {
|
||||
ac, err := readAuthConfig(*authConfigPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to load `-auth.config=%q`: %s", *authConfigPath, err)
|
||||
return fmt.Errorf("failed to load -auth.config=%q: %s", *authConfigPath, err)
|
||||
}
|
||||
|
||||
m, err := parseAuthConfigUsers(ac)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse users from `-auth.config=%q`: %s", *authConfigPath, err)
|
||||
return fmt.Errorf("failed to parse users from -auth.config=%q: %s", *authConfigPath, err)
|
||||
}
|
||||
logger.Infof("Loaded information about %d users from %q", len(m), *authConfigPath)
|
||||
logger.Infof("loaded information about %d users from -auth.config=%q", len(m), *authConfigPath)
|
||||
|
||||
authConfig.Store(ac)
|
||||
authUsers.Store(&m)
|
||||
|
|
Loading…
Reference in a new issue