Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func E() *logrus.Entry
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Init(opt ...options.Option) error
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetGlobalField(key, value string)
- func SetGlobalFields(fields map[string]interface{})
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Traceln(args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- func Warningln(args ...interface{})
- func Warnln(args ...interface{})
- func WithContext(ctx context.Context) *logrus.Entry
- func WithError(err error) *logrus.Entry
- func WithField(key string, value interface{}) *logrus.Entry
- func WithFields(fields logrus.Fields) *logrus.Entry
- func WithTime(t time.Time) *logrus.Entry
- type Logger
- func (logger *Logger) AppendGlobalFields(fields map[string]interface{})
- func (logger *Logger) ClearGlobalFields()
- func (logger *Logger) Config(opt ...options.Option) error
- func (logger *Logger) E() *logrus.Entry
- func (logger *Logger) L() *logrus.Logger
- func (logger *Logger) SetGlobalField(key, value string)
- func (logger *Logger) SetGlobalFields(fields map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶ added in v1.3.0
func Debug(args ...interface{})
Debug logs a message at level Debug on the standard logger.
func Debugf ¶ added in v1.3.0
func Debugf(format string, args ...interface{})
Debugf logs a message at level Debug on the standard logger.
func Debugln ¶ added in v1.3.0
func Debugln(args ...interface{})
Debugln logs a message at level Debug on the standard logger.
func Error ¶ added in v1.3.0
func Error(args ...interface{})
Error logs a message at level Error on the standard logger.
func Errorf ¶ added in v1.3.0
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger.
func Errorln ¶ added in v1.3.0
func Errorln(args ...interface{})
Errorln logs a message at level Error on the standard logger.
func Fatal ¶ added in v1.3.0
func Fatal(args ...interface{})
Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Fatalf ¶ added in v1.3.0
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Fatalln ¶ added in v1.3.0
func Fatalln(args ...interface{})
Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Info ¶ added in v1.3.0
func Info(args ...interface{})
Info logs a message at level Info on the standard logger.
func Infof ¶ added in v1.3.0
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger.
func Infoln ¶ added in v1.3.0
func Infoln(args ...interface{})
Infoln logs a message at level Info on the standard logger.
func Panic ¶ added in v1.3.0
func Panic(args ...interface{})
Panic logs a message at level Panic on the standard logger.
func Panicf ¶ added in v1.3.0
func Panicf(format string, args ...interface{})
Panicf logs a message at level Panic on the standard logger.
func Panicln ¶ added in v1.3.0
func Panicln(args ...interface{})
Panicln logs a message at level Panic on the standard logger.
func Print ¶ added in v1.3.0
func Print(args ...interface{})
Print logs a message at level Info on the standard logger.
func Printf ¶ added in v1.3.0
func Printf(format string, args ...interface{})
Printf logs a message at level Info on the standard logger.
func Println ¶ added in v1.3.0
func Println(args ...interface{})
Println logs a message at level Info on the standard logger.
func SetGlobalField ¶ added in v1.3.1
func SetGlobalField(key, value string)
func SetGlobalFields ¶ added in v1.3.1
func SetGlobalFields(fields map[string]interface{})
func Trace ¶ added in v1.3.0
func Trace(args ...interface{})
Trace logs a message at level Trace on the standard logger.
func Tracef ¶ added in v1.3.0
func Tracef(format string, args ...interface{})
Tracef logs a message at level Trace on the standard logger.
func Traceln ¶ added in v1.3.0
func Traceln(args ...interface{})
Traceln logs a message at level Trace on the standard logger.
func Warn ¶ added in v1.3.0
func Warn(args ...interface{})
Warn logs a message at level Warn on the standard logger.
func Warnf ¶ added in v1.3.0
func Warnf(format string, args ...interface{})
Warnf logs a message at level Warn on the standard logger.
func Warning ¶ added in v1.3.0
func Warning(args ...interface{})
Warning logs a message at level Warn on the standard logger.
func Warningf ¶ added in v1.3.0
func Warningf(format string, args ...interface{})
Warningf logs a message at level Warn on the standard logger.
func Warningln ¶ added in v1.3.0
func Warningln(args ...interface{})
Warningln logs a message at level Warn on the standard logger.
func Warnln ¶ added in v1.3.0
func Warnln(args ...interface{})
Warnln logs a message at level Warn on the standard logger.
func WithContext ¶ added in v1.3.0
WithContext creates an entry from the standard logger and adds a context to it.
func WithError ¶ added in v1.3.0
WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
func WithField ¶ added in v1.3.0
WithField creates an entry from the standard logger and adds a field to it. If you want multiple fields, use `WithFields`.
Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.
func WithFields ¶ added in v1.3.0
WithFields creates an entry from the standard logger and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field.
Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) AppendGlobalFields ¶ added in v1.4.0
func (*Logger) ClearGlobalFields ¶ added in v1.4.0
func (logger *Logger) ClearGlobalFields()