Skip to content

Commit

Permalink
Merge pull request #580 from jirikuncar/jirikuncar/logger
Browse files Browse the repository at this point in the history
Respect TF_LOG for debug output
  • Loading branch information
jirikuncar authored Jul 15, 2020
2 parents a284644 + 0e79a32 commit 09b22c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datadog/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
configV1.SetUnstableOperationEnabled("ListLogIndexes", true)
configV1.SetUnstableOperationEnabled("UpdateLogsIndex", true)
configV1.UserAgent = getUserAgent(configV1.UserAgent)
configV1.Debug = logging.IsDebugOrHigher()
if apiURL := d.Get("api_url").(string); apiURL != "" {
parsedApiUrl, parseErr := url.Parse(apiURL)
if parseErr != nil {
Expand Down Expand Up @@ -191,6 +192,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
)
configV2 := datadogV2.NewConfiguration()
configV2.UserAgent = getUserAgent(configV2.UserAgent)
configV2.Debug = logging.IsDebugOrHigher()
if apiURL := d.Get("api_url").(string); apiURL != "" {
parsedApiUrl, parseErr := url.Parse(apiURL)
if parseErr != nil {
Expand Down

0 comments on commit 09b22c0

Please sign in to comment.