diff --git a/main.go b/main.go index 0e96789c3..58e8bd563 100644 --- a/main.go +++ b/main.go @@ -201,14 +201,6 @@ func main() { if err != nil { server.PrintAndDie(fmt.Sprintf("%s: %s", exe, err)) } - - // we do this check here and not below the function creating the users - CreateUsersFromConfigOnFirstSystemLoad because we need the s *Server for logs - if errCreateUsers != nil { - s.Warnf("[tenant: %v]Failed create users from config file", s.MemphisGlobalAccountString(), errCreateUsers.Error()) - } - if lenUsers > 0 { - s.Noticef("[tenant: %v]loaded %d users from config file", s.MemphisGlobalAccountString(), lenUsers) - } // Configure the logger based on the flags s.ConfigureLogger() @@ -217,6 +209,14 @@ func main() { server.PrintAndDie(err.Error()) } + // we do this check here and not below the function creating the users - CreateUsersFromConfigOnFirstSystemLoad because we need the s *Server for logs + if errCreateUsers != nil { + s.Warnf("[tenant: %v]Failed create users from config file %v", s.MemphisGlobalAccountString(), errCreateUsers.Error()) + } + if lenUsers > 0 { + s.Noticef("[tenant: %v]loaded %d users from config file", s.MemphisGlobalAccountString(), lenUsers) + } + // Adjust MAXPROCS if running under linux/cgroups quotas. undo, err := maxprocs.Set(maxprocs.Logger(s.Debugf)) if err != nil {