This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Autogenerated by Thrift Compiler (0.13.0) | |
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | |
package processorinterceptortest | |
import( | |
"bytes" | |
"context" | |
"reflect" | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func NewLoggerInterceptor(logger *log.Logger) HandlerInterceptor { | |
return func(ctx context.Context, methodName string, arg interface{}, handlerFunc HandlerFunc) (result interface{}, err error) { | |
handlerResult, handlerError := handlerFunc(ctx, arg) | |
logger.Println(json.Marshal(struct { | |
MethodName string `json:"method_name"` | |
Argument interface{} `json:"argument"` | |
Result interface{} `json:"result"` | |
}{ | |
MethodName: methodName, |