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