Skip to content

Logging wrappers aren't passing pairs correctly #162

@jimsnab

Description

@jimsnab

terraform-plugin-go version

https://github.com/hashicorp/terraform-plugin-go/commit/930a5174615ae887b313f85ed5cb87cd51849170

Relevant provider source code

// ProtocolError emits a protocol subsystem log at ERROR level.
func ProtocolError(ctx context.Context, msg string, args ...interface{}) {
	tfsdklog.SubsystemError(ctx, SubsystemProto, msg, args)
}

// ProtocolTrace emits a protocol subsystem log at TRACE level.
func ProtocolTrace(ctx context.Context, msg string, args ...interface{}) {
	tfsdklog.SubsystemTrace(ctx, SubsystemProto, msg, args)
}

Terraform Configuration Files

# insert config here

Expected Behavior

grpc logged smoothly

Actual Behavior

noisy logging, in particular EXTRA_VALUE_AT_END=<nil> because args aren't passed through properly

Code is missing ...

tfsdklog.SubsystemError(ctx, SubsystemProto, msg, args...)

Steps to Reproduce

export TF_LOG=trace
terraform apply

References

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions