mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 08:06:16 -06:00
rename gin logging function to clarify that it's middleware
This commit is contained in:
parent
9ab16632de
commit
c8d78a854b
2 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ var skipPaths = map[string]interface{}{
|
|||
"/api/v1/streaming": nil,
|
||||
}
|
||||
|
||||
func loggerWithConfig() gin.HandlerFunc {
|
||||
func loggingMiddleware() gin.HandlerFunc {
|
||||
logHandler := func(c *gin.Context) {
|
||||
start := time.Now()
|
||||
path := c.Request.URL.Path
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ func New(ctx context.Context, cfg *config.Config, db db.DB) (Router, error) {
|
|||
engine := gin.New()
|
||||
|
||||
engine.Use(gin.RecoveryWithWriter(logrus.StandardLogger().Writer()))
|
||||
engine.Use(loggerWithConfig())
|
||||
engine.Use(loggingMiddleware())
|
||||
|
||||
// 8 MiB
|
||||
engine.MaxMultipartMemory = 8 << 20
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue