]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/helper/logging/logging.go
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / helper / logging / logging.go
index 433cd77d3b3d79524931f1c5c62f97e352f005f6..6bd92f77784687c1b95d7a3b2f5f93045b571cc8 100644 (file)
@@ -18,7 +18,7 @@ const (
        EnvLogFile = "TF_LOG_PATH" // Set to a file
 )
 
-var validLevels = []logutils.LogLevel{"TRACE", "DEBUG", "INFO", "WARN", "ERROR"}
+var ValidLevels = []logutils.LogLevel{"TRACE", "DEBUG", "INFO", "WARN", "ERROR"}
 
 // LogOutput determines where we should send logs (if anywhere) and the log level.
 func LogOutput() (logOutput io.Writer, err error) {
@@ -40,7 +40,7 @@ func LogOutput() (logOutput io.Writer, err error) {
 
        // This was the default since the beginning
        logOutput = &logutils.LevelFilter{
-               Levels:   validLevels,
+               Levels:   ValidLevels,
                MinLevel: logutils.LogLevel(logLevel),
                Writer:   logOutput,
        }
@@ -77,7 +77,7 @@ func LogLevel() string {
                logLevel = strings.ToUpper(envLevel)
        } else {
                log.Printf("[WARN] Invalid log level: %q. Defaulting to level: TRACE. Valid levels are: %+v",
-                       envLevel, validLevels)
+                       envLevel, ValidLevels)
        }
 
        return logLevel
@@ -90,7 +90,7 @@ func IsDebugOrHigher() bool {
 }
 
 func isValidLogLevel(level string) bool {
-       for _, l := range validLevels {
+       for _, l := range ValidLevels {
                if strings.ToUpper(level) == string(l) {
                        return true
                }