log: github.com/mendersoftware/log Index | Files

package log

import "github.com/mendersoftware/log"

Index

Package Files

log.go

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.
    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
)

func AddHook Uses

func AddHook(hook logrus.Hook)

func AddSyslogHook Uses

func AddSyslogHook() error

func Debug Uses

func Debug(args ...interface{})

func Debugf Uses

func Debugf(format string, args ...interface{})

func Debugln Uses

func Debugln(args ...interface{})

func Error Uses

func Error(args ...interface{})

func Errorf Uses

func Errorf(format string, args ...interface{})

func Errorln Uses

func Errorln(args ...interface{})

func Fatal Uses

func Fatal(args ...interface{})

func Fatalf Uses

func Fatalf(format string, args ...interface{})

func Fatalln Uses

func Fatalln(args ...interface{})

func Info Uses

func Info(args ...interface{})

func Infof Uses

func Infof(format string, args ...interface{})

func Infoln Uses

func Infoln(args ...interface{})

func Panic Uses

func Panic(args ...interface{})

func Panicf Uses

func Panicf(format string, args ...interface{})

func Panicln Uses

func Panicln(args ...interface{})

func ParseLevel Uses

func ParseLevel(level string) (logrus.Level, error)

func PopModule Uses

func PopModule()

Pop a module off the stack, restoring the previous module. This should be called from the same function that called PushModule() (for consistency in logging.

func Print Uses

func Print(args ...interface{})

func Printf Uses

func Printf(format string, args ...interface{})

func Println Uses

func Println(args ...interface{})

func PushModule Uses

func PushModule(module string)

Push a module onto the stack, all future logging calls will be printed with this module among the fields, until another module is pushed on top, or this one is popped off the stack.

func SetFormatter Uses

func SetFormatter(formatter logrus.Formatter)

func SetLevel Uses

func SetLevel(level logrus.Level)

func SetModuleFilter Uses

func SetModuleFilter(modules []string)

func SetOutput Uses

func SetOutput(out io.Writer)

func Warn Uses

func Warn(args ...interface{})

func Warnf Uses

func Warnf(format string, args ...interface{})

func Warning Uses

func Warning(args ...interface{})

func Warningf Uses

func Warningf(format string, args ...interface{})

func Warningln Uses

func Warningln(args ...interface{})

func Warnln Uses

func Warnln(args ...interface{})

type Level Uses

type Level logrus.Level

type Logger Uses

type Logger struct {
    // Inherit everything from logrus.Logger.
    logrus.Logger
    // contains filtered or unexported fields
}
var Log *Logger

A global reference to our logger.

func New Uses

func New() *Logger

func (*Logger) AddSyslogHook Uses

func (l *Logger) AddSyslogHook() error

Add the syslog hook to the logger. This is better than adding it directly, for the reasons described in the loggingHookType comments.

func (*Logger) Debug Uses

func (l *Logger) Debug(args ...interface{})

func (*Logger) Debugf Uses

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Debugln Uses

func (l *Logger) Debugln(args ...interface{})

func (*Logger) Error Uses

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf Uses

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Errorln Uses

func (l *Logger) Errorln(args ...interface{})

func (*Logger) Fatal Uses

func (l *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf Uses

func (l *Logger) Fatalf(format string, args ...interface{})

func (*Logger) Fatalln Uses

func (l *Logger) Fatalln(args ...interface{})

func (*Logger) Info Uses

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof Uses

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Infoln Uses

func (l *Logger) Infoln(args ...interface{})

func (*Logger) Panic Uses

func (l *Logger) Panic(args ...interface{})

func (*Logger) Panicf Uses

func (l *Logger) Panicf(format string, args ...interface{})

func (*Logger) Panicln Uses

func (l *Logger) Panicln(args ...interface{})

func (*Logger) PopModule Uses

func (l *Logger) PopModule()

Pop a module off the stack, restoring the previous module. This should be called from the same function that called PushModule() (for consistency in logging.

func (*Logger) Print Uses

func (l *Logger) Print(args ...interface{})

func (*Logger) Printf Uses

func (l *Logger) Printf(format string, args ...interface{})

func (*Logger) Println Uses

func (l *Logger) Println(args ...interface{})

func (*Logger) PushModule Uses

func (l *Logger) PushModule(module string)

Push a module onto the stack, all future logging calls will be printed with this module among the fields, until another module is pushed on top, or this one is popped off the stack.

func (*Logger) SetModuleFilter Uses

func (l *Logger) SetModuleFilter(modules []string)

func (*Logger) Warn Uses

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf Uses

func (l *Logger) Warnf(format string, args ...interface{})

func (*Logger) Warning Uses

func (l *Logger) Warning(args ...interface{})

func (*Logger) Warningf Uses

func (l *Logger) Warningf(format string, args ...interface{})

func (*Logger) Warningln Uses

func (l *Logger) Warningln(args ...interface{})

func (*Logger) Warnln Uses

func (l *Logger) Warnln(args ...interface{})

Package log imports 10 packages (graph) and is imported by 14 packages. Updated 2018-04-24. Refresh now. Tools for package owners.