Skip to content

Commit

Permalink
docs(readme): refactor and enhance codebase for better clarity and pe…
Browse files Browse the repository at this point in the history
…rformance

- Improve documentation for `WithServerErrorLevel` function, clarifying its purpose and usage

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Nov 29, 2024
1 parent 62fff47 commit 3624291
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ func WithClientErrorLevel(lvl zerolog.Level) Option {
})
}

// WithServerErrorLevel set the log level used for request with status code >= 500
// WithServerErrorLevel sets the logging level for server errors.
// It takes a zerolog.Level as an argument and returns an Option.
// This option modifies the serverErrorLevel field in the config struct.
func WithServerErrorLevel(lvl zerolog.Level) Option {
return optionFunc(func(c *config) {
c.serverErrorLevel = lvl
Expand Down

0 comments on commit 3624291

Please sign in to comment.