1 Star 0 Fork 0

linxing / youye-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
options.go 894 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mark 提交于 2024-01-29 17:39 . rename package
package zap
import (
"io"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gitee.com/linxing_3/youye-core/logger"
)
type Options struct {
logger.Options
}
type callerSkipKey struct{}
func WithCallerSkip(i int) logger.Option {
return logger.SetOption(callerSkipKey{}, i)
}
type configKey struct{}
// WithConfig pass zap.Config to logger
func WithConfig(c zap.Config) logger.Option {
return logger.SetOption(configKey{}, c)
}
type encoderConfigKey struct{}
// WithEncoderConfig pass zapcore.EncoderConfig to logger
func WithEncoderConfig(c zapcore.EncoderConfig) logger.Option {
return logger.SetOption(encoderConfigKey{}, c)
}
type namespaceKey struct{}
func WithNamespace(namespace string) logger.Option {
return logger.SetOption(namespaceKey{}, namespace)
}
type writerKey struct{}
func WithOutput(out io.Writer) logger.Option {
return logger.SetOption(writerKey{}, out)
}
1
https://gitee.com/linxing_3/youye-core.git
git@gitee.com:linxing_3/youye-core.git
linxing_3
youye-core
youye-core
v0.0.1-202405061706

搜索帮助

53164aa7 5694891 3bd8fe86 5694891