Avoid logging query strings
このコンテンツはまだ日本語訳がありません。
Use the SkipQueryString option in LoggerConfig to prevent query strings from appearing in logs. For example, /path?q=1 will be logged as /path.
func main() { router := gin.New()
// SkipQueryString indicates that the logger should not log the query string. // For example, /path?q=1 will be logged as /path loggerConfig := gin.LoggerConfig{SkipQueryString: true}
router.Use(gin.LoggerWithConfig(loggerConfig))}