Documentation
¶
Index ¶
- Constants
- func Client(opts ...Option) middleware.Middleware
- func Server(opts ...Option) middleware.Middleware
- type Metadata
- type Option
- func WithAccessLevel(level logger.Level) Option
- func WithDisabled(disabled bool) Option
- func WithDumpRequest(dump bool) Option
- func WithDumpResp(dump bool) Option
- func WithHandler(handler func(ctx context.Context, req any) map[string]string) Option
- func WithIgnoredRoutes(routes []string) Option
- func WithLogger(log logger.Logger) Option
- func WithMetadata(md []Metadata) Option
- func WithSlowThreshold(threshold time.Duration) Option
- func WithTimeFormat(format string) Option
- type Options
- type Redacter
Constants ¶
View Source
const (
DefaultFormat = "2006-01-02T15:04:05.999Z0700"
)
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client(opts ...Option) middleware.Middleware
Client is an client logging middleware.
func Server ¶
func Server(opts ...Option) middleware.Middleware
Server is an client logging middleware.
Types ¶
type Option ¶ added in v1.0.14
type Option func(o *Options)
Option is the option for the logger.
func WithAccessLevel ¶ added in v1.0.19
WithAccessLevel sets the access level
func WithDisabled ¶ added in v1.0.14
WithDisabled set disabled metrics.
func WithDumpRequest ¶ added in v1.0.22
func WithDumpResp ¶ added in v1.0.22
func WithHandler ¶ added in v1.0.14
WithHandler sets the handler
func WithIgnoredRoutes ¶ added in v1.0.19
WithIgnoredRoutes sets the ignored routes
func WithLogger ¶ added in v1.0.14
WithLogger sets the logger
func WithMetadata ¶ added in v1.0.19
WithMetadata sets the metadata
func WithSlowThreshold ¶ added in v1.0.14
WithSlowThreshold sets the slow threshold.
func WithTimeFormat ¶ added in v1.0.14
WithTimeFormat sets the format of the time
Click to show internal directories.
Click to hide internal directories.