mirror of
https://github.com/sascha-hemi/spaceDevices.git
synced 2026-03-21 00:04:23 +01:00
use logrus logging for gin
This commit is contained in:
@@ -25,6 +25,11 @@ func StartWebService(conf conf.ServerConf, _devices *mqtt.DeviceData, _macDb db.
|
||||
macDb = _macDb
|
||||
xsrfCheck = NewSimpleXSRFCheck()
|
||||
|
||||
// use logrus logging
|
||||
gin.DisableConsoleColor()
|
||||
gin.DefaultWriter = logrus.WithField("where", "gin").Writer()
|
||||
gin.DefaultErrorWriter = logrus.WithField("where", "gin").WriterLevel(logrus.ErrorLevel)
|
||||
|
||||
router := gin.Default()
|
||||
router.Use(gzip.Gzip(gzip.DefaultCompression))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user