Documentation
¶
Index ¶
- Constants
- func CORSHandler(handler http.Handler) http.Handler
- func FromContext(ctx context.Context, fallback *zap.Logger) *zap.Logger
- func HTTPLogger(logger *zap.Logger) func(http.Handler) http.Handler
- func InjectLogger(ctx context.Context, logger *zap.Logger) context.Context
- func UnaryLogger(logger *zap.Logger) grpc.UnaryServerInterceptor
- func UnaryRecovery(logger *zap.Logger) grpc.UnaryServerInterceptor
Constants ¶
View Source
const CorrelationIDKey = "x-correlation-id"
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext extracts the logger with correlation ID from context. Falls back to a default logger if not found.
func InjectLogger ¶
InjectLogger injects a logger into the context.
func UnaryLogger ¶
func UnaryLogger(logger *zap.Logger) grpc.UnaryServerInterceptor
func UnaryRecovery ¶
func UnaryRecovery(logger *zap.Logger) grpc.UnaryServerInterceptor
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.