From b5143159e9f8fff02053d49c573675b2ed6923c5 Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Sun, 12 Aug 2018 20:58:06 +0300 Subject: [PATCH] Use log package for dump instead of fmt This allows logging when go-auth0 package is called from terraform-provider-auth0. --- management/management.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management/management.go b/management/management.go index 3bb7c914..d632c962 100644 --- a/management/management.go +++ b/management/management.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "io" + "log" "net/http" "net/http/httputil" "net/url" @@ -66,7 +67,6 @@ type Token struct { // Management API v2. // type Management struct { - // Client manages Auth0 Client (also known as Application) resources. Client *ClientManager @@ -262,7 +262,7 @@ func (m *Management) delete(uri string) error { func (m *Management) dump(req *http.Request, res *http.Response) { b1, _ := httputil.DumpRequest(req, true) b2, _ := httputil.DumpResponse(res, true) - fmt.Printf("%s\n%s\b\n", b1, b2) + log.Printf("%s\n%s\b\n", b1, b2) } type apiOption func(*Management)