use logrus for gin's log output, fix nil pointer bug

This commit is contained in:
Christoph Haas 2021-01-13 17:49:52 +01:00
parent ec752f8b08
commit dd47f84c3d
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ func setupLogger(logger *logrus.Logger) error {
} else { } else {
f := new(logrus.JSONFormatter) f := new(logrus.JSONFormatter)
f.TimestampFormat = "2006-01-02 15:04:05" f.TimestampFormat = "2006-01-02 15:04:05"
formatter = f
} }
logger.SetFormatter(formatter) logger.SetFormatter(formatter)