Documentation
¶
Index ¶
- func New(option Option) logger.Interface
- type LogWriter
- type Logger
- func (l *Logger) Error(ctx context.Context, s string, i ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, i ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, s string, i ...interface{})
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogWriter ¶
type LogWriter interface {
Info(args ...interface{})
Warn(args ...interface{})
Error(args ...interface{})
}
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type Option ¶
type Option struct {
xlog.Config
Level string `json:"level" yaml:"level"`
Slow time.Duration `json:"slow" yaml:"slow"`
IgnoreRecordNotFoundError bool `json:"ignoreNotFound" yaml:"ignoreNotFound"`
InfoStr string `json:"infoStr" yaml:"infoStr"`
WarnStr string `json:"warnStr" yaml:"warnStr"`
ErrStr string `json:"errStr" yaml:"errStr"`
TraceStr string `json:"traceStr" yaml:"traceStr"`
TraceErrStr string `json:"traceErrStr" yaml:"traceErrStr"`
TraceWarnStr string `json:"traceWarnStr" yaml:"traceWarnStr"`
}
Click to show internal directories.
Click to hide internal directories.