-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix log interception to respect TF_LOG (#1537)
Expose more TF-originating logs for SDKv2 based resources. The log interceptor code is moving from an internal package in the pf module to the root module so it can be shared across tfbridge proper and SDKv2. Instances of context.TODO() in SDKv2 providers are eliminated in favor of propagating the right Context object which is crucial for sharing Logger objects as payload values on Context. Subsystem adapters are added to capture errors and warnings emitted by SDKv2 framework against github.com/hashicorp/terraform-plugin-log APIs. Note that provider code (e.g. AWS provider) also sometimes chooses to emit logs via this API. Fixed a small bug in log filtering where TF_LOG=x would actually filter out x level, so for example TF_LOG=DEBUG would show only ERROR level logs.
- Loading branch information
Showing
17 changed files
with
607 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.