Documentation
¶
Overview ¶
Package log is the log utilities of sdk
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PanicLevel = Level(logrus.PanicLevel) FatalLevel = Level(logrus.FatalLevel) ErrorLevel = Level(logrus.ErrorLevel) WarnLevel = Level(logrus.WarnLevel) InfoLevel = Level(logrus.InfoLevel) DebugLevel = Level(logrus.DebugLevel) SetLevel = func(level Level) { logrus.SetLevel(logrus.Level(level)) } GetLevel = func() Level { return Level(logrus.GetLevel()) } SetOutput = logrus.SetOutput SetFormatter = logrus.SetFormatter WithError = logrus.WithError WithField = logrus.WithField Debug = logrus.Debug Print = logrus.Print Info = logrus.Info Warn = logrus.Warn Warning = logrus.Warning Error = logrus.Error Panic = logrus.Panic Fatal = logrus.Fatal Debugf = logrus.Debugf Printf = logrus.Printf Infof = logrus.Infof Warnf = logrus.Warnf Warningf = logrus.Warningf Errorf = logrus.Errorf Panicf = logrus.Panicf Fatalf = logrus.Fatalf )
Functions ¶
Types ¶
type BasicLogger ¶ added in v0.6.7
BasicLogger is the logger (wrapper for logrus)
func (*BasicLogger) GetLevel ¶ added in v0.6.7
func (logger *BasicLogger) GetLevel() Level
GetLevel returns the logger level.
func (*BasicLogger) SetFormatter ¶ added in v0.6.7
func (logger *BasicLogger) SetFormatter(formatter Formatter)
SetFormatter sets the logger formatter.
func (*BasicLogger) SetLevel ¶ added in v0.6.7
func (logger *BasicLogger) SetLevel(level Level)
SetLevel sets the logger level.
func (*BasicLogger) SetOutput ¶ added in v0.6.7
func (logger *BasicLogger) SetOutput(out io.Writer)
SetOutput sets the logger output.
type Logger ¶ added in v0.6.7
type Logger interface {
Debug(...interface{})
Print(...interface{})
Info(...interface{})
Warn(...interface{})
Warning(...interface{})
Error(...interface{})
Panic(...interface{})
Fatal(...interface{})
Debugf(string, ...interface{})
Printf(string, ...interface{})
Infof(string, ...interface{})
Warnf(string, ...interface{})
Warningf(string, ...interface{})
Errorf(string, ...interface{})
Panicf(string, ...interface{})
Fatalf(string, ...interface{})
SetOutput(io.Writer)
SetFormatter(Formatter)
SetLevel(Level)
GetLevel() Level
}
Logger is the interface of SDK
Click to show internal directories.
Click to hide internal directories.