From 5deb0c03ad337d766698a020f6eb385480e47523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Garc=C3=ADa=20Veytia=20=28Puerco=29?= Date: Wed, 31 Aug 2022 20:38:13 -0500 Subject: [PATCH] http: Reduce verbosity in agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit reduces the http verbosity in the https agent. It will not print the requests made unless logrus is at debug level. Signed-off-by: Adolfo GarcĂ­a Veytia (Puerco) --- http/agent.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/http/agent.go b/http/agent.go index 358a2cf..873e73a 100644 --- a/http/agent.go +++ b/http/agent.go @@ -126,8 +126,7 @@ func (a *Agent) Get(url string) (content []byte, err error) { // GetRequest sends a GET request to a URL and returns the request and response func (a *Agent) GetRequest(url string) (response *http.Response, err error) { - logrus.Infof("Sending GET request to %s", url) - logrus.Debug() + logrus.Debugf("Sending GET request to %s", url) try := 0 for { response, err = a.AgentImplementation.SendGetRequest(a.Client(), url) @@ -162,9 +161,7 @@ func (a *Agent) Post(url string, postData []byte) (content []byte, err error) { // PostRequest sends the postData in a POST request to a URL and returns the request object func (a *Agent) PostRequest(url string, postData []byte) (response *http.Response, err error) { - logrus.Infof("Sending POST request to %s", url) - logrus.Debug(a.options.String()) - + logrus.Debugf("Sending POST request to %s", url) try := 0 for { response, err = a.AgentImplementation.SendPostRequest(a.Client(), url, postData, a.options.PostContentType)