Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Disable DEBUG Logging by Default #335

Open
rawkode opened this issue May 24, 2022 · 6 comments
Open

Disable DEBUG Logging by Default #335

rawkode opened this issue May 24, 2022 · 6 comments

Comments

@rawkode
Copy link

rawkode commented May 24, 2022

Currently, it would appear I get DEBUG logging no matter what environment variables are set.

This is when using the Pulumi provider, via. the Terraform provider.

I have no METAL_, PACKNGO_, PACKET_, or TF_ prefixed variables set in my environment.

Please advise, @displague 😄

@displague
Copy link
Contributor

Are the debug messages Terraform flavored or are they only from PACKNGO_DEBUG (Equinix Metal API requests and responses)?

@displague
Copy link
Contributor

displague commented May 24, 2022

Terraform has its own request/response debugging capabilities. This may not be packngo related at all. The formatting can reveal which tool is producing the output.

https://github.com/packethost/packngo/blob/master/packngo.go#L265-L303

@displague
Copy link
Contributor

Is this during tests? I can't find the issue, but I believe there is a Terraform issue around excessive logging (I think this was during tests).

It might help to try using the off setting for TF_LOG / TF_PROVIDER_LOG.
https://github.com/hashicorp/terraform/blob/8f923cea080c531046384c9328881409b37da53c/internal/logging/logging.go#L19-L34

@rawkode
Copy link
Author

rawkode commented May 24, 2022

Logging looks like this:

    2022/05/24 17:19:16 [DEBUG] GET https://api.equinix.com/metal/v1/ips/1ab3e425-fbdf-4051-84b6-fe371048744d

@rawkode
Copy link
Author

rawkode commented May 26, 2022

@displague What format is this and I'll try and dig into it

@rawkode
Copy link
Author

rawkode commented May 26, 2022

I guess Terraform, based on your link to the packngo logging?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants