Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move debug logs to trace #710

Closed
wants to merge 1 commit into from
Closed

Conversation

trodge
Copy link

@trodge trodge commented Mar 30, 2023

These messages are appearing in our logs during acceptance test runs and make up the majority of the log without providing much information. We would prefer if they were logged at a lower level.

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 30, 2023

CLA assistant check
All committers have signed the CLA.

@trodge trodge marked this pull request as ready for review March 30, 2023 23:51
@trodge trodge requested a review from a team as a code owner March 30, 2023 23:51
@bflad
Copy link
Contributor

bflad commented Mar 31, 2023

Hi @trodge 👋 Thank you for submitting this. While the maintainers generally agree that some of the logging (e.g. schema-based logic handoffs to provider-defined code) is likely a good candidate for log level demotion now that the framework code has stabilized since v1.0.0, per our contributing guidelines it feels like this type of developer-affecting change should be advertised and discussed in an issue first. We'll likely need to publish (and potentially try to enforce) the updated guidelines for logging levels as part of this, since the current precedent is that all handoffs to provider-defined logic should be DEBUG level. Thank you again.

@bflad
Copy link
Contributor

bflad commented Mar 31, 2023

Please note that in the meantime, you may be able to tune your logging by setting the environment variable TF_LOG_SDK_FRAMEWORK=INFO in addition to other TF_LOG* environment variables already set.

@rileykarson
Copy link

Could that target be added to https://developer.hashicorp.com/terraform/internals/debugging? We'd been trying to limit the log noise and found that these logs were coming through based on the TF_LOG_PROVIDER settings.

@bflad
Copy link
Contributor

bflad commented Apr 5, 2023

@rileykarson https://developer.hashicorp.com/terraform/plugin/log/managing has information about environment variables on the provider side of the protocol (at least for HashiCorp maintained projects), although I do see its missing TF_LOG_SDK_FRAMEWORK and it does seem ideal to link to that page from https://developer.hashicorp.com/terraform/internals/debugging. I'll get both those squared up shortly.

bflad added a commit to hashicorp/terraform-plugin-log that referenced this pull request Apr 5, 2023
bflad added a commit to hashicorp/terraform that referenced this pull request Apr 5, 2023
Reference: hashicorp/terraform-plugin-framework#710 (comment)

The goal here is to not burden the Terraform documentation with all the logging implementation details from the provider side of the protocol, but ensure the information is at least more discoverable.
bflad added a commit to hashicorp/terraform-plugin-log that referenced this pull request Apr 5, 2023
@trodge trodge closed this May 24, 2023
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants