mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-04 01:39:16 -05:00
27 lines
479 B
Go
27 lines
479 B
Go
package log
|
|
|
|
import "github.com/rs/zerolog"
|
|
|
|
// Options are the configurable options for a Controller.
|
|
type Options struct {
|
|
Level zerolog.Level
|
|
Pretty bool
|
|
}
|
|
|
|
// Option represents an option.
|
|
type Option func(o *Options)
|
|
|
|
// NewOptions returns a new Options struct.
|
|
func NewOptions() *Options {
|
|
return &Options{
|
|
Level: zerolog.DebugLevel,
|
|
}
|
|
}
|
|
|
|
// WithPretty sets the pretty option.
|
|
func WithPretty(pretty bool) Option {
|
|
return func(o *Options) {
|
|
o.Pretty = pretty
|
|
}
|
|
}
|