Skip to content

Commit 3bb9253

Browse files
authored
Use tfsdklog.ContextWithTestLogging (#574)
* Use tfsdklog.ContextWithTestLogging * Use tfsdklog.ContextWithTestLogging
1 parent 926d699 commit 3bb9253

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/hashicorp/terraform-exec v0.24.0
1515
github.com/hashicorp/terraform-json v0.27.2
1616
github.com/hashicorp/terraform-plugin-go v0.29.0
17-
github.com/hashicorp/terraform-plugin-log v0.9.0
17+
github.com/hashicorp/terraform-plugin-log v0.10.0
1818
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1
1919
github.com/mitchellh/go-testing-interface v1.14.1
2020
github.com/zclconf/go-cty v1.17.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ github.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoK
8383
github.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE=
8484
github.com/hashicorp/terraform-plugin-go v0.29.0 h1:1nXKl/nSpaYIUBU1IG/EsDOX0vv+9JxAltQyDMpq5mU=
8585
github.com/hashicorp/terraform-plugin-go v0.29.0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM=
86-
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
87-
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
86+
github.com/hashicorp/terraform-plugin-log v0.10.0 h1:eu2kW6/QBVdN4P3Ju2WiB2W3ObjkAsyfBsL3Wh1fj3g=
87+
github.com/hashicorp/terraform-plugin-log v0.10.0/go.mod h1:/9RR5Cv2aAbrqcTSdNmY1NRHP4E3ekrXRGjqORpXyB0=
8888
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1 h1:mlAq/OrMlg04IuJT7NpefI1wwtdpWudnEmjuQs04t/4=
8989
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1/go.mod h1:GQhpKVvvuwzD79e8/NZ+xzj+ZpWovdPAe8nfV/skwNU=
9090
github.com/hashicorp/terraform-registry-address v0.4.0 h1:S1yCGomj30Sao4l5BMPjTGZmCNzuv7/GDTDX99E9gTk=

internal/logging/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
func InitTestContext(ctx context.Context, t testing.T) context.Context {
2222
helperlogging.SetOutput(t)
2323

24-
ctx = tfsdklog.RegisterTestSink(ctx, t)
24+
ctx = tfsdklog.ContextWithTestLogging(ctx, t.Name())
2525
ctx = tfsdklog.NewRootSDKLogger(ctx, tfsdklog.WithLevelFromEnv(EnvTfLogSdk))
2626
ctx = tfsdklog.NewSubsystem(ctx, SubsystemHelperResource,
2727
// All calls are through the HelperResource* helper functions

0 commit comments

Comments
 (0)