logging

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logging contains shared environment variable and log functionality.

Index

Constants

View Source
const (
	// Go type of the provider selected by mux.
	KeyTfMuxProvider = "tf_mux_provider"

	// The RPC being run, such as "ApplyResourceChange"
	KeyTfRpc = "tf_rpc"
)

Global logging keys attached to all requests.

Practitioners or tooling reading logs may be depending on these keys, so be conscious of that when changing them.

View Source
const (
	// EnvTfLogSdkMux is an environment variable that sets the logging level
	// of the mux logger. Infers root SDK logging level, if unset.
	EnvTfLogSdkMux = "TF_LOG_SDK_MUX"
)

Environment variables.

View Source
const (
	// SubsystemMux is the tfsdklog subsystem name for mux logging.
	SubsystemMux = "mux"
)

Variables

This section is empty.

Functions

func InitContext

func InitContext(ctx context.Context) context.Context

InitContext creates SDK logger contexts.

func MuxTrace

func MuxTrace(ctx context.Context, msg string, additionalFields ...map[string]interface{})

MuxTrace emits a mux subsystem log at TRACE level.

func RpcContext

func RpcContext(ctx context.Context, rpc string) context.Context

RpcContext injects the RPC name into logger contexts.

func Tfprotov5ProviderServerContext

func Tfprotov5ProviderServerContext(ctx context.Context, p tfprotov5.ProviderServer) context.Context

Tfprotov5ProviderServerContext injects the chosen provider Go type

func Tfprotov6ProviderServerContext

func Tfprotov6ProviderServerContext(ctx context.Context, p tfprotov6.ProviderServer) context.Context

Tfprotov6ProviderServerContext injects the chosen provider Go type

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL