Documentation ¶
Index ¶
- func NewOneConsoleLog(params ...interface{}) (interface{}, error)
- func NewOneCustomLog(params ...interface{}) (interface{}, error)
- func NewOneRotateLog(params ...interface{}) (interface{}, error)
- func NewOneSingleLog(params ...interface{}) (interface{}, error)
- type OneConsoleLog
- type OneCustomLog
- type OneLog
- func (log *OneLog) Debug(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) Error(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) Fatal(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) Info(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) IsLevelEnable(level contract.LogLevel) bool
- func (log *OneLog) Panic(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) SetCtxFielder(handler contract.CtxFielder)
- func (log *OneLog) SetFormatter(formatter contract.Formatter)
- func (log *OneLog) SetLevel(level contract.LogLevel)
- func (log *OneLog) SetOutput(output io.Writer)
- func (log *OneLog) Trace(ctx context.Context, msg string, fields map[string]interface{})
- func (log *OneLog) Warn(ctx context.Context, msg string, fields map[string]interface{})
- type OneRotateLog
- type OneSingleLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOneConsoleLog ¶
func NewOneConsoleLog(params ...interface{}) (interface{}, error)
func NewOneCustomLog ¶
func NewOneCustomLog(params ...interface{}) (interface{}, error)
func NewOneRotateLog ¶
func NewOneRotateLog(params ...interface{}) (interface{}, error)
NewHadeRotateLog 实例化HadeRotateLog
func NewOneSingleLog ¶
func NewOneSingleLog(params ...interface{}) (interface{}, error)
NewOneSingleLog params sequence: level, ctxFielder, Formatter, map[string]interface(folder/file)
Types ¶
type OneConsoleLog ¶
type OneConsoleLog struct {
OneLog
}
type OneCustomLog ¶
type OneCustomLog struct {
OneLog
}
type OneLog ¶
type OneLog struct {
// contains filtered or unexported fields
}
func (*OneLog) IsLevelEnable ¶
IsLevelEnable 判断这个级别是否可以打印
func (*OneLog) SetCtxFielder ¶
func (log *OneLog) SetCtxFielder(handler contract.CtxFielder)
SetCxtFielder will get fields from context
func (*OneLog) SetFormatter ¶
SetFormatter will set formatter handler will covert data to string for recording
type OneRotateLog ¶
type OneRotateLog struct { OneLog // contains filtered or unexported fields }
HadeRotateLog 代表会进行切割的日志文件存储
type OneSingleLog ¶
type OneSingleLog struct { OneLog // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.