stop all console logging

This commit is contained in:
Harshavardhana 2021-07-29 23:05:57 -07:00
parent 56097dfca8
commit e7baf2d7d2

View file

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