stop all console logging

This commit is contained in:
Harshavardhana 2021-07-29 23:05:57 -07:00
parent 56097dfca8
commit e7baf2d7d2
1 changed files with 7 additions and 5 deletions

View File

@ -177,14 +177,16 @@ func initConsoleServer() (*restapi.Server, error) {
return nil, err return nil, err
} }
noLog := func(string, ...interface{}) {
// nothing to log
}
// Initialize MinIO loggers // Initialize MinIO loggers
restapi.LogInfo = logger.Info restapi.LogInfo = noLog
restapi.LogError = logger.Error restapi.LogError = noLog
api := operations.NewConsoleAPI(swaggerSpec) api := operations.NewConsoleAPI(swaggerSpec)
api.Logger = func(_ string, _ ...interface{}) { api.Logger = noLog
// nothing to log.
}
server := restapi.NewServer(api) server := restapi.NewServer(api)
// register all APIs // register all APIs