diff --git a/testrig/config.go b/testrig/config.go index 8b69b714c..2717b733e 100644 --- a/testrig/config.go +++ b/testrig/config.go @@ -18,6 +18,7 @@ package testrig import ( + "cmp" "os" "time" @@ -34,16 +35,8 @@ func InitTestConfig() { }) } -func logLevel() string { - level := "error" - if lv := os.Getenv("GTS_LOG_LEVEL"); lv != "" { - level = lv - } - return level -} - var testDefaults = config.Configuration{ - LogLevel: logLevel(), + LogLevel: cmp.Or(os.Getenv("GTS_LOG_LEVEL"), "error"), LogTimestampFormat: "02/01/2006 15:04:05.000", LogDbQueries: true, ApplicationName: "gotosocial",