Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tfsdklog: Consolidated multiple invalid log level messages and added …
…missing newline (#35) Reference: #32 This is related to SDK (or special implementations of testing framework) code which needs to execute `tfsdklog.RegisterTestSink()`, generally via the `tf5server.WithLoggingSink()`/`tf6server.WithLoggingSink()` functions. Previously in terraform-provider-kubernetes: ```console $ TF_LOG=trac go test -v -tags acceptance -run '^TestKubernetesManifest_ConfigMap$' ./manifest/test/acceptance 2022/03/04 16:51:21 Testing against Kubernetes API version: v1.22.3 === RUN TestKubernetesManifest_ConfigMap [WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF][WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF]... ``` After updating dependency: ```console $ go mod edit -replace=github.com/hashicorp/terraform-plugin-log=/Users/bflad/src/github.com/hashicorp/terraform-plugin-log $ go mod tidy $ go mod vendor $ TF_LOG=trac go test -v -tags acceptance -run '^TestKubernetesManifest_ConfigMap$' ./manifest/test/acceptance 2022/03/04 16:52:49 Testing against Kubernetes API version: v1.22.3 === RUN TestKubernetesManifest_ConfigMap [WARN] Invalid log level: "TRAC". Defaulting to level: OFF. Valid levels are: [TRACE DEBUG INFO WARN ERROR OFF] ... other test output ... ```
- Loading branch information