Documentation
¶
Index ¶
- func LogFiberClient(c *fiber.Ctx, req model.TargetRequest, res model.TargetResponse)
- func LogGRPCClient(ctx context.Context, req model.TargetRequest, res model.TargetResponse)
- func LogGinClient(c *gin.Context, req model.TargetRequest, res model.TargetResponse)
- func NewFiber(fiberConfig fiber.Config) fiber.Handler
- func NewGRPCStream() grpc.StreamServerInterceptor
- func NewGRPCUnary() grpc.UnaryServerInterceptor
- func NewGin() gin.HandlerFunc
- func SetConfig(config Config)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogFiberClient ¶
func LogFiberClient( c *fiber.Ctx, req model.TargetRequest, res model.TargetResponse, )
LogFiberClient logs a custom client request and response for Fiber.
func LogGRPCClient ¶ added in v1.1.9
func LogGRPCClient(ctx context.Context, req model.TargetRequest, res model.TargetResponse)
LogGRPCClient appends outbound call logs to the request-scoped slice.
func LogGinClient ¶ added in v1.0.2
func LogGinClient( c *gin.Context, req model.TargetRequest, res model.TargetResponse, )
LogGinClient logs a custom client request and response for Gin.
func NewGRPCStream ¶ added in v1.1.9
func NewGRPCStream() grpc.StreamServerInterceptor
NewGRPCStream returns a grpc.StreamServerInterceptor that injects Welog context and logs stream lifecycle data.
func NewGRPCUnary ¶ added in v1.1.9
func NewGRPCUnary() grpc.UnaryServerInterceptor
NewGRPCUnary returns a grpc.UnaryServerInterceptor that injects Welog context and logs request/response data.
func NewGin ¶ added in v1.0.2
func NewGin() gin.HandlerFunc
NewGin creates a new Gin middleware that logs requests and responses.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
pkg
|
|
|
constant/envkey
Package envkey defines environment variable keys used for configuring the application's connection to ElasticSearch.
|
Package envkey defines environment variable keys used for configuring the application's connection to ElasticSearch. |
|
constant/generalkey
Package generalkey defines common keys used within the application's context for logging and request handling.
|
Package generalkey defines common keys used within the application's context for logging and request handling. |
|
infrastructure/logger
Package logger provides a logging utility that integrates with ElasticSearch and uses the logrus package for structured logging.
|
Package logger provides a logging utility that integrates with ElasticSearch and uses the logrus package for structured logging. |
Click to show internal directories.
Click to hide internal directories.