[#19] Add a version with no cdn-sdk deps

Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
This commit is contained in:
Pavel Korotkov 2021-03-31 01:46:33 +03:00 committed by Pavel Korotkov
parent cdab794d62
commit 4c96885a42
20 changed files with 930 additions and 266 deletions

23
logger/option.go Normal file
View file

@ -0,0 +1,23 @@
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 } }