services

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHadeConsoleLog

func NewHadeConsoleLog(params ...interface{}) (interface{}, error)

NewHadeConsoleLog实例化HadeConsoleLog

func NewHadeCustomLog

func NewHadeCustomLog(params ...interface{}) (interface{}, error)

func NewHadeRotateLog

func NewHadeRotateLog(params ...interface{}) (interface{}, error)

NewHadeRotateLog实例化HadeRotateLog

func NewHadeSingleLog

func NewHadeSingleLog(params ...interface{}) (interface{}, error)

NewHadeSingleLog params sequence: level, ctxFielder, Formatter, map[string]interface(folder/file)

Types

type HadeConsoleLog

type HadeConsoleLog struct {
	//类型嵌套HadeLog
	HadeLog
}

HadeConsoleLog代表控制台输出

type HadeCustomLog

type HadeCustomLog struct {
	HadeLog
}

type HadeLog

type HadeLog struct {
	// contains filtered or unexported fields
}

HadeLog的通用实例

func (*HadeLog) Debug

func (log *HadeLog) Debug(ctx context.Context, msg string, fields map[string]interface{})

func (*HadeLog) Error

func (log *HadeLog) Error(ctx context.Context, msg string, fields map[string]interface{})

func (*HadeLog) Fatal

func (log *HadeLog) Fatal(ctx context.Context, msg string, fields map[string]interface{})

func (*HadeLog) Info

func (log *HadeLog) Info(ctx context.Context, msg string, fields map[string]interface{})

Info会打印出普通的日志信息

func (*HadeLog) IsLevelEnable

func (log *HadeLog) IsLevelEnable(level contract.LogLevel) bool

IsLevelEnable判断这个级别是否可以打印

func (*HadeLog) Panic

func (log *HadeLog) Panic(ctx context.Context, msg string, fields map[string]interface{})

Panic输出panic的日志信息

func (*HadeLog) SetCtxFielder

func (log *HadeLog) SetCtxFielder(handler contract.CtxFielder)

func (*HadeLog) SetFormatter

func (log *HadeLog) SetFormatter(formatter contract.Formatter)

func (*HadeLog) SetLevel

func (log *HadeLog) SetLevel(level contract.LogLevel)

func (*HadeLog) SetOutput

func (log *HadeLog) SetOutput(output io.Writer)

SetOutput设置output

func (*HadeLog) Trace

func (log *HadeLog) Trace(ctx context.Context, msg string, fields map[string]interface{})

func (*HadeLog) Warn

func (log *HadeLog) Warn(ctx context.Context, msg string, fields map[string]interface{})

type HadeRotateLog

type HadeRotateLog struct {
	HadeLog
	// contains filtered or unexported fields
}

HadeRotateLog代表会进行切割的日志文件存储

type HadeSingleLog

type HadeSingleLog struct {
	HadeLog
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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