mirror of
https://github.com/DJSundog/wg-portal.git
synced 2024-11-23 07:03:50 -05:00
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
Block a user