From 63ecd8251d85d0370935f20be5e0d76c22aa6e0c Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Sat, 11 Jan 2025 20:22:32 +0000 Subject: [PATCH] feat: add log level to environment variables sent to provider --- pkg/provider/env.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/provider/env.go b/pkg/provider/env.go index 000dc504c..6186bdf96 100644 --- a/pkg/provider/env.go +++ b/pkg/provider/env.go @@ -8,13 +8,15 @@ import ( "strings" "github.com/loft-sh/devpod/pkg/config" + log2 "github.com/loft-sh/log" ) const ( // general - DEVPOD = "DEVPOD" - DEVPOD_OS = "DEVPOD_OS" - DEVPOD_ARCH = "DEVPOD_ARCH" + DEVPOD = "DEVPOD" + DEVPOD_OS = "DEVPOD_OS" + DEVPOD_ARCH = "DEVPOD_ARCH" + DEVPOD_LOG_LEVEL = "DEVPOD_LOG_LEVEL" // workspace WORKSPACE_ID = "WORKSPACE_ID" @@ -183,6 +185,7 @@ func GetBaseEnvironment(context, provider string) map[string]string { retVars[PROVIDER_CONTEXT] = context providerFolder, _ := GetProviderDir(context, provider) retVars[PROVIDER_FOLDER] = filepath.ToSlash(providerFolder) + retVars[DEVPOD_LOG_LEVEL] = log2.Default.GetLevel().String() return retVars }