Documentation
¶
Index ¶
- func ParseLevel(levelStr string) (zerolog.Level, error)
- func SetLogger(opts ...Option) gin.HandlerFunc
- type Fn
- type Option
- func WithClientErrorLevel(lvl zerolog.Level) Option
- func WithDefaultLevel(lvl zerolog.Level) Option
- func WithLogger(fn func(*gin.Context, zerolog.Logger) zerolog.Logger) Option
- func WithServerErrorLevel(lvl zerolog.Level) Option
- func WithSkipPath(s []string) Option
- func WithSkipPathRegexps(regs ...*regexp.Regexp) Option
- func WithUTC(s bool) Option
- func WithWriter(s io.Writer) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLevel ¶
ParseLevel converts a level string into a zerolog Level value. returns an error if the input string does not match known values.
func SetLogger ¶
func SetLogger(opts ...Option) gin.HandlerFunc
SetLogger initializes the logging middleware.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithLogger ¶
WithLogger set custom logger func
func WithSkipPath ¶
WithSkipPath skip URL path by specific pattern
func WithSkipPathRegexps ¶
WithSkipPathRegexps multiple skip URL paths by regexp pattern
Click to show internal directories.
Click to hide internal directories.