Documentation ¶
Index ¶
- Constants
- func AddHook(hook logrus.Hook)
- func AddSyslogHook() error
- 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 Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func ParseLevel(level string) (logrus.Level, error)
- func PopModule()
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func PushModule(module string)
- func SetFormatter(formatter logrus.Formatter)
- func SetLevel(level logrus.Level)
- func SetModuleFilter(modules []string)
- func SetOutput(out io.Writer)
- 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{})
- type Level
- type Logger
- func (l *Logger) AddSyslogHook() error
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Debugln(args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Errorln(args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Fatalln(args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Infoln(args ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(format string, args ...interface{})
- func (l *Logger) Panicln(args ...interface{})
- func (l *Logger) PopModule()
- func (l *Logger) Print(args ...interface{})
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) Println(args ...interface{})
- func (l *Logger) PushModule(module string)
- func (l *Logger) SetModuleFilter(modules []string)
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Warning(args ...interface{})
- func (l *Logger) Warningf(format string, args ...interface{})
- func (l *Logger) Warningln(args ...interface{})
- func (l *Logger) Warnln(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. 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 )
Variables ¶
This section is empty.
Functions ¶
func AddSyslogHook ¶
func AddSyslogHook() error
func PopModule ¶
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 PushModule ¶
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 ¶
func SetModuleFilter ¶
func SetModuleFilter(modules []string)
Types ¶
type Logger ¶
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 (*Logger) AddSyslogHook ¶
Add the syslog hook to the logger. This is better than adding it directly, for the reasons described in the loggingHookType comments.
func (*Logger) PopModule ¶
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) PushModule ¶
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.