Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintTable ¶
PrintTable prints a table with header columns and string values
func SetFakePrintTable ¶
SetFakePrintTable is a testing tool that allows overwriting the function PrintTable
Types ¶
type Level ¶
type Level uint32
Level type
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 )
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 { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) Done(args ...interface{}) Donef(format string, args ...interface{}) Fail(args ...interface{}) Failf(format string, args ...interface{}) StartWait(message string) StopWait() Print(level Level, args ...interface{}) Printf(level Level, format string, args ...interface{}) Write(message []byte) (int, error) WriteString(message string) SetLevel(level Level) GetLevel() Level }
Logger defines the common logging interface
Click to show internal directories.
Click to hide internal directories.