diff --git a/options.go b/options.go index 2906586..933b11d 100644 --- a/options.go +++ b/options.go @@ -61,18 +61,21 @@ func WithWriter(s io.Writer) Option { }) } +// WithDefaultLevel set the log level used for request with status code < 400 func WithDefaultLevel(lvl zerolog.Level) Option { return optionFunc(func(c *config) { c.defaultLevel = lvl }) } +// WithClientErrorLevel set the log level used for request with status code between 400 and 499 func WithClientErrorLevel(lvl zerolog.Level) Option { return optionFunc(func(c *config) { c.clientErrorLevel = lvl }) } +// WithServerErrorLevel set the log level used for request with status code >= 500 func WithServerErrorLevel(lvl zerolog.Level) Option { return optionFunc(func(c *config) { c.serverErrorLevel = lvl