Documentation ¶
Index ¶
- func NewGocoreConsoleLog(params ...interface{}) (interface{}, error)
- func NewGocoreCustomLog(params ...interface{}) (interface{}, error)
- func NewGocoreRotateLog(params ...interface{}) (interface{}, error)
- func NewGocoreSingleLog(params ...interface{}) (interface{}, error)
- type GocoreConsoleLog
- type GocoreCustomLog
- type GocoreLog
- func (log *GocoreLog) Debug(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) Error(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) Fatal(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) Info(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) IsLevelEnable(level contract.LogLevel) bool
- func (log *GocoreLog) Panic(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) SetCtxFielder(handler contract.CtxFielder)
- func (log *GocoreLog) SetFormatter(formatter contract.Formatter)
- func (log *GocoreLog) SetLevel(level contract.LogLevel)
- func (log *GocoreLog) SetOutput(output io.Writer)
- func (log *GocoreLog) Trace(ctx context.Context, msg string, fields map[string]interface{})
- func (log *GocoreLog) Warn(ctx context.Context, msg string, fields map[string]interface{})
- type GocoreRotateLog
- type GocoreSingleLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGocoreConsoleLog ¶
func NewGocoreConsoleLog(params ...interface{}) (interface{}, error)
NewGocoreConsoleLog 实例化GocoreConsoleLog
func NewGocoreCustomLog ¶
func NewGocoreCustomLog(params ...interface{}) (interface{}, error)
func NewGocoreRotateLog ¶
func NewGocoreRotateLog(params ...interface{}) (interface{}, error)
func NewGocoreSingleLog ¶
func NewGocoreSingleLog(params ...interface{}) (interface{}, error)
Types ¶
type GocoreCustomLog ¶
type GocoreCustomLog struct {
GocoreLog
}
type GocoreLog ¶
type GocoreLog struct {
// contains filtered or unexported fields
}
GocoreLog log的通用结构
func (*GocoreLog) IsLevelEnable ¶
IsLevelEnable 判断这个级别是否可以打印
func (*GocoreLog) SetCtxFielder ¶
func (log *GocoreLog) SetCtxFielder(handler contract.CtxFielder)
SetCtxFielder will get fields from context
func (*GocoreLog) SetFormatter ¶
SetFormatter will set formatter handler will covert data to string for recording
type GocoreRotateLog ¶
type GocoreRotateLog struct { GocoreLog // contains filtered or unexported fields }
type GocoreSingleLog ¶
type GocoreSingleLog struct { GocoreLog // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.