use logrus for gin's log output, fix nil pointer bug
This commit is contained in:
parent
ec752f8b08
commit
dd47f84c3d
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue