Documentation ¶
Index ¶
- Variables
- func NewConsoleZapLogger(level zapcore.Level, separator, fileName string, maxSize int, ...) (*zap.Logger, zap.AtomicLevel)
- func NewJsonZapLogger(level zapcore.Level, fileName string, maxSize int, stdout, development bool) (*zap.Logger, zap.AtomicLevel)
- type LoggerOptions
- type Option
- func (Option) CallerSkip(skip int) option.Setting[LoggerOptions]
- func (Option) Default() option.Setting[LoggerOptions]
- func (Option) RuntimeInfo(b bool) option.Setting[LoggerOptions]
- func (Option) ServiceInfo(b bool) option.Setting[LoggerOptions]
- func (Option) ZapLogger(logger *zap.Logger) option.Setting[LoggerOptions]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = plugin.Install Uninstall = plugin.Uninstall )
Functions ¶
Types ¶
type LoggerOptions ¶
type LoggerOptions struct { ZapLogger *zap.Logger ServiceInfo bool RuntimeInfo bool CallerSkip int }
LoggerOptions 所有选项
type Option ¶
type Option struct{}
Option 所有选项设置器
func (Option) CallerSkip ¶
func (Option) CallerSkip(skip int) option.Setting[LoggerOptions]
CallerSkip 调用堆栈skip值,用于打印调用堆栈信息
func (Option) RuntimeInfo ¶
func (Option) RuntimeInfo(b bool) option.Setting[LoggerOptions]
RuntimeInfo 添加runtime信息
func (Option) ServiceInfo ¶
func (Option) ServiceInfo(b bool) option.Setting[LoggerOptions]
ServiceInfo 添加service信息
Click to show internal directories.
Click to hide internal directories.