Print golang http errors in MinIO log format (#16465)

This commit is contained in:
Anis Elleuch
2023-01-26 18:16:16 +01:00
committed by GitHub
parent 027ff0f3a8
commit 1fd7946dce
2 changed files with 11 additions and 1 deletions

View File

@@ -589,7 +589,7 @@ func serverMain(ctx *cli.Context) {
UseIdleTimeout(ctx.Duration("idle-timeout")).
UseReadHeaderTimeout(ctx.Duration("read-header-timeout")).
UseBaseContext(GlobalContext).
UseCustomLogger(log.New(io.Discard, "", 0)) // Turn-off random logging by Go stdlib
UseCustomLogger(log.New(&goHTTPLogger{}, "", 0))
go func() {
globalHTTPServerErrorCh <- httpServer.Start(GlobalContext)