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