Skip to content

Commit f85ce02

Browse files
committed
chore: properly log loaded env
1 parent 52cb8cb commit f85ce02

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/template/environment.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
type environment any
1515

1616
func loadEnvironment(input []byte, forceJSON, forceTOML, forceYAML bool) environment {
17-
log.Default().SetLevel(log.DebugLevel)
1817
var env environment
1918

2019
if len(input) > 0 && input[0] == '@' {
@@ -57,7 +56,7 @@ func loadEnvironment(input []byte, forceJSON, forceTOML, forceYAML bool) environ
5756

5857
func loadJSONEnvironment(input []byte, env *environment) error {
5958
if err := json.Unmarshal(input, &env); err == nil {
60-
log.Debug("Loaded JSON environment", "env", env)
59+
log.Debug("Loaded JSON environment", "env", *env)
6160
return nil
6261
} else {
6362
log.Debug("Error parsing JSON", "error", err)
@@ -67,7 +66,7 @@ func loadJSONEnvironment(input []byte, env *environment) error {
6766

6867
func loadTOMLEnvironment(input []byte, env *environment) error {
6968
if err := toml.Unmarshal(input, &env); err == nil {
70-
log.Debug("Loaded TOML environment", "env", env)
69+
log.Debug("Loaded TOML environment", "env", *env)
7170
return nil
7271
} else {
7372
log.Debug("Error parsing TOML", "error", err)
@@ -77,7 +76,7 @@ func loadTOMLEnvironment(input []byte, env *environment) error {
7776

7877
func loadYAMLEnvironment(input []byte, env *environment) error {
7978
if err := yaml.Unmarshal(input, &env); err == nil {
80-
log.Debug("Loaded YAML environment", "env", env)
79+
log.Debug("Loaded YAML environment", "env", *env)
8180
return nil
8281
} else {
8382
log.Debug("Error parsing YAML", "error", err)

0 commit comments

Comments
 (0)