services

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.0.2

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
}

HadeConsoleLog 代表控制台输出

type HadeCustomLog added in v0.0.2

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{})

Debug will add debug record which contains msg and fields

func (*HadeLog) Error

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

Error will add error record which contains msg and fields

func (*HadeLog) Fatal

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

Fatal will add fatal record which contains msg and fields

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 added in v0.0.2

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

SetCxtFielder will get fields from context

func (*HadeLog) SetFormatter

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

SetFormatter will set formatter handler will covert data to string for recording

func (*HadeLog) SetLevel

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

SetLevel set log level, and higher level will be recorded

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{})

Trace will add trace info which contains msg and fields

func (*HadeLog) Warn

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

Warn will add warn record which contains msg and fields

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