diff --git a/consulacl/config.go b/consulacl/config.go index cbcf411..abc3583 100644 --- a/consulacl/config.go +++ b/consulacl/config.go @@ -2,7 +2,9 @@ package consulacl import ( "fmt" + consul "github.com/hashicorp/consul/api" + "github.com/hashicorp/terraform/helper/logging" ) type Config struct { @@ -43,6 +45,13 @@ func (c *Config) Client() (*consul.Client, error) { config.Token = c.Token } + if logging.IsDebugOrHigher() { + config.HttpClient.Transport = logging.NewTransport( + "consulacl", + config.HttpClient.Transport, + ) + } + client, err := consul.NewClient(config) if err != nil {