Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CtxKey = ctxKey{}
The key used to retrieve tfbridge.Logger from a context.
Functions ¶
func InitLogging ¶
func InitLogging(ctx context.Context, opts LogOptions) context.Context
Sets up Context-scoped loggers to route Terraform logs to the Pulumi CLI process so they are visible to the user.
Log verbosity is controlled by the TF_LOG environment variable (set to TRACE, DEBUG, INFO, WARN, ERROR or OFF). By default, INFO-level logs are emitted.
See also:
- https://developer.hashicorp.com/terraform/plugin/log/writing - https://www.pulumi.com/docs/support/troubleshooting
Types ¶
type LogOptions ¶
See InitLogging.
type Sink ¶
type Sink interface { Log(context context.Context, sev diag.Severity, urn resource.URN, msg string) error LogStatus(context context.Context, sev diag.Severity, urn resource.URN, msg string) error }
Abstracts the logging interface to HostClient. This is the interface providers use to report logging information back to the Pulumi CLI over gRPC.
func NewDiscardSink ¶ added in v3.103.0
func NewDiscardSink() Sink
This logging sink discards all messages.
func NewTestingSink ¶ added in v3.103.0
Build a Sink that flushes to *testing.T or a similar context.
type T ¶ added in v3.103.0
Methods required by NewTestingSink from *testing.T.