Documentation ¶
Overview ¶
Package log wraps logrus to include source line/function information
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- 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(config Config)
- 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 SetLevel(level Level)
- func SetOut(out io.Writer)
- 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 Warnln(args ...interface{})
- type Config
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Level ¶
type Level uint8
Level describes the log severity level.
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. 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 // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
These are the different logging levels. You can set the logging level to log on your instance of logger, obtained with `logrus.New()`.
type Logger ¶
type Logger interface { With(key string, value interface{}) Logger WithError(err error) Logger SetLevel(level Level) SetOut(out io.Writer) Trace(...interface{}) Debug(...interface{}) Print(...interface{}) Info(...interface{}) Warn(...interface{}) Error(...interface{}) Fatal(...interface{}) Panic(...interface{}) Tracef(string, ...interface{}) Debugf(string, ...interface{}) Printf(string, ...interface{}) Infof(string, ...interface{}) Warnf(string, ...interface{}) Errorf(string, ...interface{}) Fatalf(string, ...interface{}) Panicf(string, ...interface{}) Traceln(...interface{}) Debugln(...interface{}) Println(...interface{}) Infoln(...interface{}) Warnln(...interface{}) Errorln(...interface{}) Fatalln(...interface{}) Panicln(...interface{}) }
Logger is an interface that describes logging.
Click to show internal directories.
Click to hide internal directories.