logger

package
v1.142.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTfLogger added in v1.51.0

func SetTfLogger(tfLogger *TfLogger)

Types

type TfLogger

type TfLogger struct {
	// contains filtered or unexported fields
}

func NewTfLogger added in v1.51.0

func NewTfLogger(ctx context.Context) *TfLogger

This function expects the context to have the logger key configured to hold the logger. Please see: GetProviderRootLogger defined in terraform-plugin-log here: https://github.com/hashicorp/terraform-plugin-log/blob/main/internal/logging/provider.go#L14 for reference.

func (*TfLogger) Debugf

func (tfLogger *TfLogger) Debugf(_ context.Context, format string, v ...any)

func (*TfLogger) Enabled

func (tfLogger *TfLogger) Enabled(_ context.Context, _ logger.Level) bool

This function is always enabled because TfLogger implements the Logger interface from Go SDK and there we check if the logging is enabled based on level (which default to Info). This however isn't possible here since tflog isn't enabled / disabled based on log level. Omitting is done internally through the `ShouldOmit` method that filters based on logger configurations.

func (*TfLogger) Errorf

func (tfLogger *TfLogger) Errorf(_ context.Context, format string, v ...any)

func (*TfLogger) Infof

func (tfLogger *TfLogger) Infof(_ context.Context, format string, v ...any)

func (*TfLogger) Tracef

func (tfLogger *TfLogger) Tracef(_ context.Context, format string, v ...any)

func (*TfLogger) Warnf

func (tfLogger *TfLogger) Warnf(_ context.Context, format string, v ...any)

Jump to

Keyboard shortcuts

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