package
0.0.0-20210318024954-d9e4b8ca2e42
Repository: https://github.com/pangpanglabs/goutils.git
Documentation: pkg.go.dev
# README
goutils/echomiddleware
Getting Started
Basic usage
A log is logged when the api is called
e := echo.New()
e.Pre(echomiddleware.ContextBase())
e.Use(echomiddleware.BehaviorLogger("xxx-Service", echomiddleware.KafkaConfig(
echomiddleware.KafkaConfig{
Brokers: []string{
"127.0.0.1:9092",
},
Topic: "behaviorlog",
},
))
Advanced usage
e := echo.New()
e.Pre(echomiddleware.ContextBase())
e.Use(echomiddleware.BehaviorLogger("xxx-Service", echomiddleware.KafkaConfig(
echomiddleware.KafkaConfig{
Brokers: []string{
"127.0.0.1:9092",
},
Topic: "behaviorlog",
},
), func(logContext *behaviorlog.LogContext) {
logContext.BodyHide = true//Optional: Available when performing scheduled tasks to save large amounts of data
}))
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
# Variables
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author