Skip to content

Commit

Permalink
Use --debug to set TraceOn to minio client (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatpat authored Mar 3, 2023
1 parent 3f2510f commit d78528e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"math/rand"
"net"
"net/http"
"os"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -168,6 +169,11 @@ func getClient(ctx *cli.Context, host string) (*minio.Client, error) {
return nil, err
}
cl.SetAppInfo(appName, pkg.Version)

if ctx.Bool("debug") {
cl.TraceOn(os.Stderr)
}

return cl, nil
}

Expand Down

0 comments on commit d78528e

Please sign in to comment.