mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-20 02:57:05 +00:00
config: Replace robfig with envconfig for #86
- Initial envconfig system is working, not bulletproof. - Added sane defaults for required parameters.
This commit is contained in:
@@ -72,7 +72,7 @@ func SetLogLevel(level string) (ok bool) {
|
||||
case "TRACE":
|
||||
MaxLevel = TRACE
|
||||
default:
|
||||
Errorf("Unknown log level requested: " + level)
|
||||
golog.Print("Error, unknown log level requested: " + level)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@@ -150,7 +150,6 @@ func openLogFile() error {
|
||||
return fmt.Errorf("failed to create %v: %v", logfname, err)
|
||||
}
|
||||
golog.SetOutput(logf)
|
||||
Tracef("Opened new logfile")
|
||||
// Platform specific
|
||||
reassignStdout()
|
||||
return nil
|
||||
@@ -158,7 +157,6 @@ func openLogFile() error {
|
||||
|
||||
// closeLogFile closes the current logfile
|
||||
func closeLogFile() {
|
||||
Tracef("Closing logfile")
|
||||
// We are never in a situation where we can do anything about failing to close
|
||||
_ = logf.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user