Movatterモバイル変換


[0]ホーム

URL:


logging

package
v1.17.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:MPL-2.0Imports:2Imported by:0

Details

Repository

github.com/hashicorp/terraform-plugin-framework

Links

Documentation

Overview

Package logging contains framework internal helpers for consistent loggerand log entry handling.

Index

Constants

View Source
const (// Attribute path representation, which is typically in flatmap form such// as parent.0.child in this project.KeyAttributePath = "tf_attribute_path"// The type of action being operated on, such as "examplecloud_do_thing"KeyActionType = "tf_action_type"// The type of data source being operated on, such as "archive_file"KeyDataSourceType = "tf_data_source_type"// The type of ephemeral resource being operated on, such as "random_password"KeyEphemeralResourceType = "tf_ephemeral_resource_type"// The Deferred reason for an RPC responseKeyDeferredReason = "tf_deferred_reason"// Human readable string when calling a provider defined type that must// implement the Description() method, such as validators.KeyDescription = "description"// Underlying Go error string when logging an error.KeyError = "error"// The name of function being operated on, such as "parse_xyz"KeyFunctionName = "tf_function_name"// The type of resource being operated on, such as "random_pet"KeyResourceType = "tf_resource_type"// The type of list resource being operated on, such as "random_pet"KeyListResourceType = "tf_list_resource_type"// The type of value being operated on, such as "JSONStringValue".KeyValueType = "tf_value_type")

Structured logging keys.

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

Refer to the terraform-plugin-go logging keys as well, which should beequivalent to these when possible.

View Source
const (// EnvTfLogSdkFramework is an environment variable that sets the logging// level of SDK framework loggers. Infers root SDK logging level, if// unset.EnvTfLogSdkFramework = "TF_LOG_SDK_FRAMEWORK")

Environment variables.

View Source
const (// SubsystemFramework is the tfsdklog subsystem name for framework.SubsystemFramework = "framework")

Variables

This section is empty.

Functions

funcFrameworkDebug

func FrameworkDebug(ctxcontext.Context, msgstring, additionalFields ...map[string]interface{})

FrameworkDebug emits a framework subsystem log at DEBUG level.

funcFrameworkError

func FrameworkError(ctxcontext.Context, msgstring, additionalFields ...map[string]interface{})

FrameworkError emits a framework subsystem log at ERROR level.

funcFrameworkTrace

func FrameworkTrace(ctxcontext.Context, msgstring, additionalFields ...map[string]interface{})

FrameworkTrace emits a framework subsystem log at TRACE level.

funcFrameworkWarn

func FrameworkWarn(ctxcontext.Context, msgstring, additionalFields ...map[string]interface{})

FrameworkWarn emits a framework subsystem log at WARN level.

funcFrameworkWithAttributePath

func FrameworkWithAttributePath(ctxcontext.Context, attributePathstring)context.Context

FrameworkWithAttributePath returns a new Context with KeyAttributePath set.The attribute path is expected to be string, so the logging package does notneed to import path handling code.

funcInitContext

func InitContext(ctxcontext.Context)context.Context

InitContext creates SDK logger contexts. The incoming context willalready have the root SDK logger and root provider logger setup fromterraform-plugin-go tf6server RPC handlers.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp