feat(logger): support env config

This commit is contained in:
Gaze
2024-06-20 18:52:56 +07:00
parent a1d7524615
commit 373ea50319

View File

@@ -119,10 +119,10 @@ type Config struct {
// - Text (default)
// - JSON
// - GCP: Output format for Stackdriver Logging/Cloud Logging or others GCP services.
Output string `mapstructure:"output"`
Output string `mapstructure:"output" env:"OUTPUT" envDefault:"text"`
// Debug is enabled logger level debug. (default: false)
Debug bool `mapstructure:"debug"`
Debug bool `mapstructure:"debug" env:"DEBUG" envDefault:"false"`
}
var (