From 1c5ad85de1996f1fc96f38b5df45b3528725e737 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Fri, 17 Jul 2020 22:14:04 -0500 Subject: [PATCH] Added handling for default logger if one is not specified. Fixes #1899 --- config/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index d460f71e..4e0451de 100644 --- a/config/config.go +++ b/config/config.go @@ -55,6 +55,9 @@ func LoadConfig(filepath string) (*Config, error) { if err != nil { return nil, err } + if config.Logging == nil { + config.Logging = &log.Config{} + } // Choosing the migrations directory based on the database used. config.MigrationsPath = config.MigrationsPath + config.DBName // Explicitly set the TestFlag to false to prevent config.json overrides