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