frostfs-http-gw/logger/option.go
Pavel Korotkov 4c96885a42 [#19] Add a version with no cdn-sdk deps
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00

23 lines
909 B
Go

package logger
import "go.uber.org/zap"
func WithSamplingInitial(v int) Option { return func(o *options) { o.SamplingInitial = v } }
func WithSamplingThereafter(v int) Option { return func(o *options) { o.SamplingThereafter = v } }
func WithFormat(v string) Option { return func(o *options) { o.Format = v } }
func WithLevel(v string) Option { return func(o *options) { o.Level = v } }
func WithTraceLevel(v string) Option { return func(o *options) { o.TraceLevel = v } }
func WithoutDisclaimer() Option { return func(o *options) { o.NoDisclaimer = true } }
func WithoutCaller() Option { return func(o *options) { o.NoCaller = true } }
func WithAppName(v string) Option { return func(o *options) { o.AppName = v } }
func WithAppVersion(v string) Option { return func(o *options) { o.AppVersion = v } }
func WithZapOptions(opts ...zap.Option) Option { return func(o *options) { o.Options = opts } }