console_log

package
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: LGPL-2.1 Imports: 12 Imported by: 0

Documentation

Index

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) Default

func (Option) Default() option.Setting[LoggerOptions]

Default 默认值

func (Option) Development

func (Option) Development(b bool) option.Setting[LoggerOptions]

Development 开发模式

func (Option) Level

func (Option) Level(level log.Level) option.Setting[LoggerOptions]

Level 日志等级

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 时间格式

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL