Documentation
¶
Index ¶
Constants ¶
const ( EnvLog = "TF_LOG" // See ValidLevels EnvLogFile = "TF_LOG_PATH" // Set to a file EnvAccLogFile = "TF_ACC_LOG_PATH" // Set to a file // EnvLogPathMask splits test log files by name. EnvLogPathMask = "TF_LOG_PATH_MASK" )
These are the environmental variables that determine if we log, and if we log whether or not the log should go to a file.
Variables ¶
var ValidLevels = []logutils.LogLevel{"TRACE", "DEBUG", "INFO", "WARN", "ERROR"}
Functions ¶
func GetTestLogContext ¶ added in v2.10.0
GetTestLogContext creates a context that is registered to the SDK log sink. This function is for internal usage only and is not supported by the project's compatibility promises.
func IsDebugOrHigher ¶
func IsDebugOrHigher() bool
IsDebugOrHigher returns whether or not the current log level is debug or trace
func LogLevel ¶
func LogLevel() string
LogLevel returns the current log level string based the environment vars
func LogOutput ¶
LogOutput determines where we should send logs (if anywhere) and the log level. This only effects this log.Print* functions called in the provider under test. Dependency providers for the provider under test will have their logging controlled by Terraform itself and managed with the TF_ACC_LOG_PATH environment variable. Calls to tflog.* will have their output managed by the tfsdklog sink.
func NewTransport ¶
func NewTransport(name string, t http.RoundTripper) *transport
Types ¶
This section is empty.