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