Documentation ¶
Overview ¶
Package logging contains shared environment variable and log functionality.
Index ¶
- Constants
- func InitContext(ctx context.Context) context.Context
- func MuxTrace(ctx context.Context, msg string, additionalFields ...map[string]interface{})
- func RpcContext(ctx context.Context, rpc string) context.Context
- func Tfprotov5ProviderServerContext(ctx context.Context, p tfprotov5.ProviderServer) context.Context
- func Tfprotov6ProviderServerContext(ctx context.Context, p tfprotov6.ProviderServer) context.Context
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 ¶
InitContext creates SDK logger contexts.
func RpcContext ¶
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.
Click to show internal directories.
Click to hide internal directories.