add log
This commit is contained in:
parent
a05451e99a
commit
1b2769d429
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"service/library/logger"
|
"service/library/logger"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -91,7 +92,9 @@ func LoggerMiddleware(conf gin.LoggerConfig) gin.HandlerFunc {
|
||||||
bodyStr = string(body.([]byte))
|
bodyStr = string(body.([]byte))
|
||||||
}
|
}
|
||||||
logger.Info("%s params: %s", formatter(param), bodyStr)
|
logger.Info("%s params: %s", formatter(param), bodyStr)
|
||||||
//logger.Info("%s response: %s", formatter(param), blw.body.String())
|
if strings.Contains(param.Path, "is_there_a_new_version_available") {
|
||||||
|
logger.Info("%s response: %s", formatter(param), blw.body.String())
|
||||||
|
}
|
||||||
|
|
||||||
//logger.WithCtx(c.Request.Context()).Info("%s params: %s", formatter(param), bodyStr)
|
//logger.WithCtx(c.Request.Context()).Info("%s params: %s", formatter(param), bodyStr)
|
||||||
//if accessConf.LogResponseEnabled {
|
//if accessConf.LogResponseEnabled {
|
||||||
|
|
Loading…
Reference in New Issue