Documentation ¶
Index ¶
- Variables
- type LoggerOptions
- type Option
- func (Option) CallerFullName(b bool) option.Setting[LoggerOptions]
- func (Option) CallerSkip(skip int) option.Setting[LoggerOptions]
- func (Option) Default() option.Setting[LoggerOptions]
- func (Option) Development(b bool) option.Setting[LoggerOptions]
- func (Option) Level(level log.Level) option.Setting[LoggerOptions]
- func (Option) RuntimeInfo(b bool) option.Setting[LoggerOptions]
- func (Option) Separator(sp string) option.Setting[LoggerOptions]
- func (Option) ServiceInfo(b bool) option.Setting[LoggerOptions]
- func (Option) TimestampLayout(layout string) option.Setting[LoggerOptions]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = plugin.Install Uninstall = plugin.Uninstall )
Functions ¶
This section is empty.
Types ¶
type LoggerOptions ¶
type LoggerOptions struct { Level log.Level Development bool ServiceInfo bool RuntimeInfo bool Separator string TimestampLayout string CallerFullName bool CallerSkip int }
LoggerOptions 所有选项
type Option ¶
type Option struct{}
Option 所有选项设置器
func (Option) CallerFullName ¶
func (Option) CallerFullName(b bool) option.Setting[LoggerOptions]
CallerFullName 是否打印完整调用堆栈信息
func (Option) CallerSkip ¶
func (Option) CallerSkip(skip int) option.Setting[LoggerOptions]
CallerSkip 调用堆栈skip值,用于打印调用堆栈信息
func (Option) Development ¶
func (Option) Development(b bool) option.Setting[LoggerOptions]
Development 开发模式
func (Option) RuntimeInfo ¶
func (Option) RuntimeInfo(b bool) option.Setting[LoggerOptions]
RuntimeInfo 添加runtime信息
func (Option) Separator ¶
func (Option) Separator(sp string) option.Setting[LoggerOptions]
Separator 分隔符
func (Option) ServiceInfo ¶
func (Option) ServiceInfo(b bool) option.Setting[LoggerOptions]
ServiceInfo 添加service信息
func (Option) TimestampLayout ¶
func (Option) TimestampLayout(layout string) option.Setting[LoggerOptions]
TimestampLayout 时间格式
Click to show internal directories.
Click to hide internal directories.