This commit is contained in:
10
log/log.go
10
log/log.go
@@ -65,10 +65,9 @@ func ToLevel(level string) Level {
|
||||
}
|
||||
}
|
||||
|
||||
// GetLevel returns the log level from the environment variable.
|
||||
// GetLevel returns the default log level.
|
||||
func GetLevel() Level {
|
||||
level := os.Getenv("LOG_LEVEL")
|
||||
return ToLevel(level)
|
||||
return LevelInfo
|
||||
}
|
||||
|
||||
// Output represents the log output.
|
||||
@@ -93,8 +92,7 @@ func ToOutput(output string) Output {
|
||||
}
|
||||
}
|
||||
|
||||
// GetOutput returns the log output from the environment variable.
|
||||
// GetOutput returns the default log output.
|
||||
func GetOutput() Output {
|
||||
output := os.Getenv("LOG_OUTPUT")
|
||||
return ToOutput(output)
|
||||
return OutputText
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user