forked from TrueCloudLab/frostfs-http-gw
[#19] Add a version with no cdn-sdk deps
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
This commit is contained in:
parent
cdab794d62
commit
4c96885a42
20 changed files with 930 additions and 266 deletions
23
logger/option.go
Normal file
23
logger/option.go
Normal 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 } }
|
Loading…
Add table
Add a link
Reference in a new issue