A log is logged when the api is called
e := echo.New()
e.Use(echomiddleware.BehaviorLogger("xxx-Service", echomiddleware.KafkaConfig(
echomiddleware.KafkaConfig{
Brokers: []string{
"127.0.0.1:9092",
},
Topic: "behaviorlog",
},
))
e := echo.New()
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
}))