[cli] Log query params in debug mode
This commit is contained in:
parent
ddd89aa1d1
commit
51d3238a52
|
@ -34,6 +34,9 @@ func logRequest(req *resty.Request) {
|
||||||
if len(req.QueryParam) > 0 {
|
if len(req.QueryParam) > 0 {
|
||||||
fmt.Println(color.GreenString("Query Params:"))
|
fmt.Println(color.GreenString("Query Params:"))
|
||||||
for k, v := range req.QueryParam {
|
for k, v := range req.QueryParam {
|
||||||
|
if k == TokenQuery {
|
||||||
|
v = []string{"REDACTED"}
|
||||||
|
}
|
||||||
fmt.Printf("%s: %s\n", color.CyanString(k), color.YellowString(strings.Join(v, ",")))
|
fmt.Printf("%s: %s\n", color.CyanString(k), color.YellowString(strings.Join(v, ",")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue