Documentation
¶
Index ¶
- Constants
- func SetDefaultLog(l Logger)
- type EtLogger
- func (el *EtLogger) Data(msg string)
- func (el *EtLogger) Debug(msg string)
- func (el *EtLogger) Enable(level core.Level) bool
- func (el *EtLogger) Error(msg string)
- func (el *EtLogger) Fatal(msg string)
- func (el *EtLogger) Info(msg string)
- func (el *EtLogger) Warn(msg string)
- func (el *EtLogger) WithError(err error) Logger
- func (el *EtLogger) WithField(field string, v interface{}) Logger
- func (el *EtLogger) WithFields(fields core.Fields) Logger
- func (el *EtLogger) WithMarkers(markers ...string) Logger
- type Handlers
- type Logger
- type OptionFunc
Constants ¶
View Source
const ( DefaultConfigPath = "log.yaml" BaseSkip = 5 )
Variables ¶
This section is empty.
Functions ¶
func SetDefaultLog ¶
func SetDefaultLog(l Logger)
Types ¶
type EtLogger ¶
type EtLogger struct {
// contains filtered or unexported fields
}
func NewEtLogger ¶
func NewEtLogger(options ...OptionFunc) (*EtLogger, error)
func (*EtLogger) WithMarkers ¶
type Logger ¶
type Logger interface { Debug(msg string) Info(msg string) Data(msg string) Warn(msg string) Error(msg string) Fatal(msg string) WithField(field string, v interface{}) Logger WithFields(fields core.Fields) Logger WithError(err error) Logger WithMarkers(markers ...string) Logger Enable(level core.Level) bool }
var Log Logger
type OptionFunc ¶
func SetConfigPath ¶
func SetConfigPath(configPath string) OptionFunc
func SetErrorLog ¶
func SetErrorLog(errLog opt.Printfer) OptionFunc
func SetInfoLog ¶
func SetInfoLog(infoLog opt.Printfer) OptionFunc
func SetPostLog ¶
func SetPostLog(postLog ...opt.LogFunc) OptionFunc
func SetPreLog ¶
func SetPreLog(preLog ...opt.LogFunc) OptionFunc
func SetSourceSkip ¶
func SetSourceSkip(skip uint) OptionFunc