Documentation
¶
Index ¶
- func Init(cfg config.LoggingConfig)
- func L() *zerolog.Logger
- func RequestContextMiddleware(cfg config.LoggingConfig) func(http.Handler) http.Handler
- func RequestHeaderName(cfg config.LoggingConfig) string
- func RequestIDFromContext(ctx context.Context) string
- func TraceHeaderName(cfg config.LoggingConfig) string
- func TraceIDFromContext(ctx context.Context) string
- func WithContext(ctx context.Context) *zerolog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(cfg config.LoggingConfig)
Init configures the global logger based on configuration values.
func RequestContextMiddleware ¶
RequestContextMiddleware injects request/trace identifiers into the request context.
func RequestHeaderName ¶
func RequestHeaderName(cfg config.LoggingConfig) string
RequestHeaderName returns the configured request header name, falling back to default.
func RequestIDFromContext ¶
RequestIDFromContext extracts the request identifier from context if present.
func TraceHeaderName ¶
func TraceHeaderName(cfg config.LoggingConfig) string
TraceHeaderName returns the configured trace header name, falling back to default.
func TraceIDFromContext ¶
TraceIDFromContext extracts the trace identifier from context if present.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.