Documentation ¶
Index ¶
- func NewHadeConsoleLog(params ...interface{}) (interface{}, error)
- func NewHadeCustomLog(params ...interface{}) (interface{}, error)
- func NewHadeRotateLog(params ...interface{}) (interface{}, error)
- func NewHadeSingleLog(params ...interface{}) (interface{}, error)
- type HadeConsoleLog
- type HadeCustomLog
- type HadeLog
- func (log *HadeLog) Debug(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) Error(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) Fatal(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) Info(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) IsLevelEnable(level contract.LogLevel) bool
- func (log *HadeLog) Panic(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) SetCtxFielder(handler contract.CtxFielder)
- func (log *HadeLog) SetFormatter(formatter contract.Formatter)
- func (log *HadeLog) SetLevel(level contract.LogLevel)
- func (log *HadeLog) SetOutput(output io.Writer)
- func (log *HadeLog) Trace(ctx context.Context, msg string, fields map[string]interface{})
- func (log *HadeLog) Warn(ctx context.Context, msg string, fields map[string]interface{})
- type HadeRotateLog
- type HadeSingleLog
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 HadeCustomLog ¶
type HadeCustomLog struct {
HadeLog
}
type HadeLog ¶
type HadeLog struct {
// contains filtered or unexported fields
}
HadeLog 的通用实例
func (*HadeLog) IsLevelEnable ¶
IsLevelEnable 判断这个级别是否可以打印
func (*HadeLog) SetCtxFielder ¶
func (log *HadeLog) SetCtxFielder(handler contract.CtxFielder)
SetCxtFielder will get fields from context
func (*HadeLog) SetFormatter ¶
SetFormatter will set formatter handler will covert data to string for recording
type HadeRotateLog ¶
type HadeRotateLog struct { HadeLog // contains filtered or unexported fields }
HadeRotateLog 代表会进行切割的日志文件存储
type HadeSingleLog ¶
type HadeSingleLog struct { HadeLog // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.