services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJadeConsoleLog

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

func NewJadeCustomLog

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

func NewJadeRotateLog

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

func NewJadeSingleLog

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

Types

type JadeConsoleLog

type JadeConsoleLog struct {
	JadeLog
}

type JadeCustomLog

type JadeCustomLog struct {
	JadeLog
}

type JadeLog

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

func (*JadeLog) Debug

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

Debug will add debug record which contains msg and fields

func (*JadeLog) Error

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

Error will add error record which contains msg and fields

func (*JadeLog) Fatal

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

Fatal will add fatal record which contains msg and fields

func (*JadeLog) Info

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

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

func (*JadeLog) IsLevelEnable

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

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

func (*JadeLog) Panic

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

Panic 输出panic的日志信息

func (*JadeLog) SetCtxFielder

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

SetCxtFielder will get fields from context

func (*JadeLog) SetFormatter

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

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

func (*JadeLog) SetLevel

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

func (*JadeLog) SetOutput

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

SetOutput 设置output

func (*JadeLog) Trace

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

Trace will add trace info which contains msg and fields

func (*JadeLog) Warn

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

Warn will add warn record which contains msg and fields

type JadeRotateLog

type JadeRotateLog struct {
	JadeLog
	// contains filtered or unexported fields
}

type JadeSingleLog

type JadeSingleLog struct {
	JadeLog
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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