Documentation
¶
Index ¶
- func HaveDebugTag(tag string) bool
- func SetupVerboseLog(log Log, isVerbose bool)
- type DebugFunc
- type DevCtlFormatter
- type Log
- type LogLevel
- type Logger
- func (l *Logger) Child(name string) Log
- 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) Logf(lvl LogLevel, format string, 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) Print(args ...interface{})
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) Println(args ...interface{})
- func (l *Logger) SetLevel(level LogLevel)
- 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{})
- func (l *Logger) WithError(err error) *logrus.Entry
- func (l *Logger) WithField(key string, value interface{}) *logrus.Entry
- func (l *Logger) WithFields(fields logrus.Fields) *logrus.Entry
- type Option
- func WithBuffer(b *bytes.Buffer) Option
- func WithDebugFunc(debugFn DebugFunc) Option
- func WithExitFn(exitFn func(int)) Option
- func WithFormatter(format logrus.Formatter) Option
- func WithLevel(level LogLevel) Option
- func WithName(name string) Option
- func WithOutputs(w ...io.Writer) Option
- func WithVerbose(verbose bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HaveDebugTag ¶
func SetupVerboseLog ¶
Types ¶
type DevCtlFormatter ¶
type DevCtlFormatter struct{}
type Log ¶
type Log interface {
logrus.FieldLogger
Fatalf(format string, args ...interface{})
Panicf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Warnf(format string, args ...interface{})
Infof(format string, args ...interface{})
Debugf(format string, args ...interface{})
Logf(level LogLevel, format string, args ...interface{})
Child(name string) Log
SetLevel(level LogLevel)
}
type LogLevel ¶
type LogLevel int
const ( // Debug messages, write to debug logs only by logutils.Debug. LogLevelDebug LogLevel = 0 // Information messages, don't write too much messages, // only useful ones: they are shown when running with -v. LogLevelInfo LogLevel = 1 // Hidden errors: non critical errors: work can be continued, no need to fail whole program; // tests will crash if any warning occurred. LogLevelWarn LogLevel = 2 // Only not hidden from user errors: whole program failing, usually // error logging happens in 1-2 places: in the "main" function. LogLevelError LogLevel = 3 )
type Logger ¶
type Option ¶
func WithBuffer ¶
func WithDebugFunc ¶
func WithExitFn ¶
func WithFormatter ¶
func WithOutputs ¶
func WithVerbose ¶
Click to show internal directories.
Click to hide internal directories.