package middleware

import (
	"game-driver/leaf"
	"go.uber.org/zap"
)

func RunLog() leaf.HandlerFunc {
	return func(c *leaf.Context) {
		zap.S().Infof("收到消息, topic: %s, payload: %s", c.Topic, c.Payload)
		defer zap.S().Infof("处理结束")

		c.Next()
	}
}
