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