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