Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func DebugStack(err error)
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func ErrorStack(err error)
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalStack(err error)
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func InfoStack(err error)
- func Infof(format string, args ...interface{})
- func Panic(args ...interface{})
- func PanicStack(err error)
- func Panicf(format string, args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func SetLevel(level logger.Level)
- func SetOutput(out io.Writer)
- func Warn(args ...interface{})
- func WarnStack(err error)
- func Warnf(format string, args ...interface{})
- func Warning(args ...interface{})
- func Warningf(format string, args ...interface{})
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) DebugStack(err error)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) ErrorStack(err error)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) FatalStack(err error)
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) InfoStack(err error)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) PanicStack(err error)
- func (l *Logger) Panicf(format string, args ...interface{})
- func (l *Logger) SetLevel(level logrus.Level)
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) WarnStack(err error)
- func (l *Logger) Warnf(format string, args ...interface{})
Constants ¶
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel = logrus.PanicLevel // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel = logrus.FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel = logrus.ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel = logrus.WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel = logrus.InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel = logrus.DebugLevel )
These are the different logging levels. You can set the logging level to log on your instance of logger.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(args ...interface{})
Debug logs a message at level Debug on the standard logger.
func DebugStack ¶
func DebugStack(err error)
DebugStack a error's detail at level Debug on the standard logger.
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a message at level Debug on the standard logger.
func Error ¶
func Error(args ...interface{})
Error logs a message at level Error on the standard logger.
func ErrorStack ¶
func ErrorStack(err error)
ErrorStack a error's detail at level Error on the standard logger.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger.
func Fatal ¶
func Fatal(args ...interface{})
Fatal logs a message at level Fatal on the standard logger.
func FatalStack ¶
func FatalStack(err error)
FatalStack a error's detail at level Fatal on the standard logger.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger.
func Info ¶
func Info(args ...interface{})
Info logs a message at level Info on the standard logger.
func InfoStack ¶
func InfoStack(err error)
InfoStack a error's detail at level Info on the standard logger.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger.
func Panic ¶
func Panic(args ...interface{})
Panic logs a message at level Panic on the standard logger.
func PanicStack ¶
func PanicStack(err error)
PanicStack logs a error's detail at level Panic on the standard logger.
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf logs a message at level Panic on the standard logger.
func Print ¶
func Print(args ...interface{})
Print logs a message at level Info on the standard logger.
func Printf ¶
func Printf(format string, args ...interface{})
Printf logs a message at level Info on the standard logger.
func Warn ¶
func Warn(args ...interface{})
Warn logs a message at level Warn on the standard logger.
func WarnStack ¶
func WarnStack(err error)
WarnStack a error's detail at level Warn on the standard logger.
func Warnf ¶
func Warnf(format string, args ...interface{})
Warnf logs a message at level Warn on the standard logger.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a wrapper of logrus logger type.
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug log the debug level message.
func (*Logger) DebugStack ¶
DebugStack log the debug level error detail.
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error log the error level message.
func (*Logger) ErrorStack ¶
ErrorStack log the error level error detail.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(args ...interface{})
Fatal log the fatal level message then fatal.
func (*Logger) FatalStack ¶
FatalStack log the fatal level error detail.
func (*Logger) Panic ¶
func (l *Logger) Panic(args ...interface{})
Panic log the panic level message then panic.
func (*Logger) PanicStack ¶
PanicStack log the panic level error detail.