Skip to content

Commit e2c7b78

Browse files
author
Paddy Carver
committed
Include protocol version in protocol level logger.
1 parent 7782d35 commit e2c7b78

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tfprotov5/tf5server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ func (s *server) loggingContext(ctx context.Context) context.Context {
217217
ctx = tfsdklog.NewSubsystem(ctx, tflogSubsystemName, append(tfsdklog.Options{
218218
tfsdklog.WithLevelFromEnv("TF", "LOG", "SDK", "PROTO"),
219219
}, s.tflogSDKOpts...)...)
220+
ctx = tfsdklog.SubsystemWith(ctx, tflogSubsystemName, "tf_proto_version", "5")
220221

221222
// set up the provider logger
222223
ctx = tfsdklog.NewRootProviderLogger(ctx, s.tflogOpts...)

tfprotov6/tf6server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ func (s *server) loggingContext(ctx context.Context) context.Context {
219219
ctx = tfsdklog.NewSubsystem(ctx, tflogSubsystemName, append(tfsdklog.Options{
220220
tfsdklog.WithLevelFromEnv("TF", "LOG", "SDK", "PROTO"),
221221
}, s.tflogSDKOpts...)...)
222+
ctx = tfsdklog.SubsystemWith(ctx, tflogSubsystemName, "tf_proto_version", "6")
222223

223224
// set up the provider logger
224225
ctx = tfsdklog.NewRootProviderLogger(ctx, s.tflogOpts...)

0 commit comments

Comments
 (0)