Add THRESHOLD_* env var support with BOUNDARY_* fallback
Introduce api.Getenv/api.LookupEnv which prefer THRESHOLD_X and fall back to legacy BOUNDARY_X; use them for user-facing env var reads. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eeb38a1a84
commit
306960d24b
16 files changed
+135
-57
No files matched your search
@@ -5,8 +5,8 @@ package logging
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
@@ -67,7 +67,7 @@ func ParseLogFormat(format string) (LogFormat, error) {
|
||||
|
||||
// ParseEnvLogFormat parses the log format from an environment variable.
|
||||
func ParseEnvLogFormat() LogFormat {
|
||||
logFormat := os.Getenv("BOUNDARY_LOG_FORMAT")
|
||||
logFormat := api.Getenv("BOUNDARY_LOG_FORMAT")
|
||||
switch strings.ToLower(logFormat) {
|
||||
case "json":
|
||||
return JSONFormat
|
||||
|
||||
Reference in new issue
Block a user