mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 13:10:22 +03:00
Modify fatalIf, startup and update message logging code (#5780)
Use a common logging framework to log fatalIf, startup, Info and Update messages.
This commit is contained in:
+3
-3
@@ -34,9 +34,9 @@ func checkUpdate(mode string) {
|
||||
// Its OK to ignore any errors during doUpdate() here.
|
||||
if updateMsg, _, currentReleaseTime, latestReleaseTime, err := getUpdateInfo(2*time.Second, mode); err == nil {
|
||||
if globalInplaceUpdateDisabled {
|
||||
logger.Println(updateMsg)
|
||||
logger.StartupMessage(updateMsg)
|
||||
} else {
|
||||
logger.Println(prepareUpdateMessage("Run `minio update`", latestReleaseTime.Sub(currentReleaseTime)))
|
||||
logger.StartupMessage(prepareUpdateMessage("Run `minio update`", latestReleaseTime.Sub(currentReleaseTime)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func initConfig() {
|
||||
logger.FatalIf(loadConfig(), "Unable to load config version: '%s'.", serverConfigVersion)
|
||||
} else {
|
||||
logger.FatalIf(newConfig(), "Unable to initialize minio config for the first time.")
|
||||
logger.Println("Created minio configuration file successfully at " + getConfigDir())
|
||||
logger.Info("Created minio configuration file successfully at " + getConfigDir())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user