Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Use log package for dump instead of fmt
Browse files Browse the repository at this point in the history
This allows logging when go-auth0 package is called from
terraform-provider-auth0.
  • Loading branch information
hypnoglow committed Aug 12, 2018
1 parent 1849dea commit b514315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions management/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"net/http/httputil"
"net/url"
Expand Down Expand Up @@ -66,7 +67,6 @@ type Token struct {
// Management API v2.
//
type Management struct {

// Client manages Auth0 Client (also known as Application) resources.
Client *ClientManager

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b514315

Please sign in to comment.