Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Error(msg string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(msg string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Fine(msg string, args ...interface{})
- func GetLevel() logrus.Level
- func GetStackInfo() (string, string, string)
- func Info(msg string, args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Panic(msg string, args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func Print(msg string, args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SetDefaultLogLevel(level Level)
- func SetLevel(level logrus.Level)
- func SetOutput(out io.Writer)
- func Severe(msg string, args ...interface{})
- func StandardLogger() logrus.FieldLogger
- func Warn(msg string, args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warning(msg string, args ...interface{})
- func Warningf(format string, args ...interface{})
- func Warningln(args ...interface{})
- func Warnln(args ...interface{})
- type Formatter
- type Level
- type Logger
- type StackHook
- type WithLocalLogger
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 )
const StackInfoFormat = "%s (%s:%s)"
const UndefStack = "???"
Variables ¶
Functions ¶
func Debug ¶
func Debug(msg string, args ...interface{})
Debug logs a message 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 Debugln ¶
func Debugln(args ...interface{})
Debugln logs a message at level Debug on the standard logger.
func Error ¶
func Error(msg string, args ...interface{})
Error logs a message 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 Errorln ¶
func Errorln(args ...interface{})
Errorln logs a message at level Error on the standard logger.
func Fatal ¶
func Fatal(msg string, args ...interface{})
Fatal logs a message 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 Fatalln ¶
func Fatalln(args ...interface{})
Fatalln logs a message at level Fatal on the standard logger.
func GetStackInfo ¶
func Info ¶
func Info(msg string, args ...interface{})
Info logs a message 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 Infoln ¶
func Infoln(args ...interface{})
Infoln logs a message at level Info on the standard logger.
func Panic ¶
func Panic(msg string, args ...interface{})
Panic logs a message 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 Panicln ¶
func Panicln(args ...interface{})
Panicln logs a message at level Panic on the standard logger.
func Print ¶
func Print(msg string, 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 Println ¶
func Println(args ...interface{})
Println logs a message at level Info on the standard logger.
func SetDefaultLogLevel ¶
func SetDefaultLogLevel(level Level)
func StandardLogger ¶
func StandardLogger() logrus.FieldLogger
func Warn ¶
func Warn(msg string, args ...interface{})
Warn logs a message 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.
func Warning ¶
func Warning(msg string, args ...interface{})
Warning logs a message at level Warn on the standard logger.
func Warningf ¶
func Warningf(format string, args ...interface{})
Warningf logs a message at level Warn on the standard logger.
Types ¶
type Formatter ¶
type Formatter struct { *prefixed.TextFormatter ShortNames bool }
func NewFormatter ¶
type Level ¶
------ OLD INTERNAL LOGGER BACKWARD COMPARABLE FUNCTIONS -------------------------------
type Logger ¶
type Logger interface { logrus.FieldLogger }
func WithError ¶
WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
func WithField ¶
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 ¶
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.
type StackHook ¶
type StackHook struct{}
StackHook is an hook for logrus logger that adds file, line, function info.
type WithLocalLogger ¶
type WithLocalLogger interface { // Log returns Logger instance Log() Logger }