Documentation ¶
Overview ¶
Package logging uses the logr.Logger interface to integrate with different logging implementation for structured logging
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
ContextWithLogger wraps the logr NewContext function
func EchoContextWithLogger ¶
func EchoContextWithLogger(ctx echo.Context, l Logger) echo.Context
EchoContextWithLogger the logger in the given echo context
func Middleware ¶
func Middleware(next echo.HandlerFunc, loggers ...Logger) echo.HandlerFunc
Middleware creates a production logger and sets it in the context for the incoming requests. incoming requests will have a logger that can be use in the handler.
Types ¶
type Logger ¶
func LoggerFromContext ¶
LoggerFromContext wraps the LoggerFromContext or creates a Zap production logger
func LoggerFromEchoContext ¶
func LoggerFromEchoContext(ctx echo.Context) Logger
LoggerFromEchoContext find the logger in the echo context or returns a new prom logger
func NewPromLogger ¶
func NewPromLogger() Logger
NewPromLogger wraps the creation of a new prometheus production logger
func NewPromLoggerWithOpts ¶
Click to show internal directories.
Click to hide internal directories.