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:
kannappanr
2018-04-10 09:37:14 -07:00
committed by GitHub
parent cef992a395
commit 57a3d9c16c
10 changed files with 199 additions and 145 deletions

View File

@@ -22,7 +22,6 @@ import (
"os"
"time"
"github.com/minio/mc/pkg/console"
"github.com/minio/minio/cmd/logger"
)
@@ -218,11 +217,11 @@ func waitForFormatXL(ctx context.Context, firstDisk bool, endpoints EndpointList
switch err {
case errNotFirstDisk:
// Fresh setup, wait for first server to be up.
console.Println("Waiting for the first server to format the disks.")
logger.Info("Waiting for the first server to format the disks.")
continue
case errXLReadQuorum:
// no quorum available continue to wait for minimum number of servers.
console.Printf("Waiting for a minimum of %d disks to come online (elapsed %s)\n", len(endpoints)/2, getElapsedTime())
logger.Info("Waiting for a minimum of %d disks to come online (elapsed %s)\n", len(endpoints)/2, getElapsedTime())
continue
case errXLV3ThisEmpty:
// need to wait for this error to be healed, so continue.