Documentation ¶
Index ¶
- func SetTfLogger(tfLogger *TfLogger)
- type TfLogger
- func (tfLogger *TfLogger) Debugf(_ context.Context, format string, v ...any)
- func (tfLogger *TfLogger) Enabled(_ context.Context, _ logger.Level) bool
- func (tfLogger *TfLogger) Errorf(_ context.Context, format string, v ...any)
- func (tfLogger *TfLogger) Infof(_ context.Context, format string, v ...any)
- func (tfLogger *TfLogger) Tracef(_ context.Context, format string, v ...any)
- func (tfLogger *TfLogger) Warnf(_ context.Context, format string, v ...any)
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
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) Enabled ¶
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.
Click to show internal directories.
Click to hide internal directories.