Fix an issue where MinIO was logging every error twice (#8953)

The logging subsystem was initialized under init() method in
both gateway-main.go and server-main.go which are part of
same package. This created two logging targets and hence
errors were logged twice. This PR moves the init() method
to common-main.go
This commit is contained in:
Nitish Tiwari
2020-02-07 13:48:07 +05:30
committed by GitHub
parent 07edb7c7f8
commit 15e2ea2c96
3 changed files with 13 additions and 21 deletions

View File

@@ -35,15 +35,6 @@ import (
"github.com/minio/minio/pkg/env"
)
func init() {
logger.Init(GOPATH, GOROOT)
logger.RegisterError(config.FmtError)
// Initialize globalConsoleSys system
globalConsoleSys = NewConsoleLogger(context.Background())
logger.AddTarget(globalConsoleSys)
}
var (
gatewayCmd = cli.Command{
Name: "gateway",