Documentation
¶
Index ¶
- Variables
- func AddHook(hook logrus.Hook)
- func Debug(args ...interface{})
- func DebugMode() bool
- 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 Print(args ...interface{})
- func Printf(args ...interface{})
- func Println(args ...interface{})
- func SetDebugMode(isEnabled bool)
- func SetLevelName(name string) error
- func SetOutput(output io.Writer)
- func Tracef(format string, args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- type Entry
- func (entry *Entry) Debug(args ...interface{})
- func (entry *Entry) Debugf(format string, args ...interface{})
- func (entry *Entry) Debugln(args ...interface{})
- func (entry *Entry) Error(args ...interface{})
- func (entry *Entry) Errorf(format string, args ...interface{})
- func (entry *Entry) Errorln(args ...interface{})
- func (entry *Entry) Fatal(args ...interface{})
- func (entry *Entry) Fatalf(format string, args ...interface{})
- func (entry *Entry) Fatalln(args ...interface{})
- func (entry *Entry) Info(args ...interface{})
- func (entry *Entry) Infof(format string, args ...interface{})
- func (entry *Entry) Infoln(args ...interface{})
- func (entry *Entry) Panic(args ...interface{})
- func (entry *Entry) Panicf(format string, args ...interface{})
- func (entry *Entry) Panicln(args ...interface{})
- func (entry *Entry) Print(args ...interface{})
- func (entry *Entry) Printf(format string, args ...interface{})
- func (entry *Entry) Println(args ...interface{})
- func (entry *Entry) Trace(args ...interface{})
- func (entry *Entry) Tracef(format string, args ...interface{})
- func (entry *Entry) Traceln(args ...interface{})
- func (entry *Entry) Warn(args ...interface{})
- func (entry *Entry) Warnf(format string, args ...interface{})
- func (entry *Entry) Warnln(args ...interface{})
- func (entry *Entry) WithCaller(skip int) *Entry
- func (entry *Entry) WithContext(ctx context.Context) *Entry
- func (entry *Entry) WithError(err error) *Entry
- func (entry *Entry) WithField(key string, value interface{}) *Entry
- func (entry *Entry) WithFields(fields Fields) *Entry
- func (entry *Entry) WithPrefix(value string) *Entry
- type Fields
- type Logger
Constants ¶
This section is empty.
Variables ¶
var DefaultLogger = NewLogger()
DefaultLogger is logger with default settings
Functions ¶
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal then the process will exit with status set to 1.
func Fatalln ¶
func Fatalln(args ...interface{})
Fatalln logs a message at level Fatal then the process will exit with status set to 1.
func SetLevelName ¶
SetLevelName parses and sets the defaultLogger level.
Types ¶
type Entry ¶ added in v0.0.4
Entry represents a wrapped logrus.Entry
func NewDefaultEntry ¶ added in v0.0.4
func NewDefaultEntry() *Entry
NewDefaultEntry returns a new Entry instance using default logger.
func WithContext ¶
WithContext adds an context to log entry, using the value defined inside of context.
func WithPrefix ¶ added in v0.0.4
WithPrefix adds a prefix to log entry.
func (*Entry) Debug ¶ added in v0.0.4
func (entry *Entry) Debug(args ...interface{})
Debug logs a message at level Debug.
func (*Entry) Debugln ¶ added in v0.0.4
func (entry *Entry) Debugln(args ...interface{})
Debugln logs a message at level Debug.
func (*Entry) Error ¶ added in v0.0.4
func (entry *Entry) Error(args ...interface{})
Error logs a message at level Error.
func (*Entry) Errorln ¶ added in v0.0.4
func (entry *Entry) Errorln(args ...interface{})
Errorln logs a message at level Error.
func (*Entry) Fatal ¶ added in v0.0.4
func (entry *Entry) Fatal(args ...interface{})
Fatal logs a message at level Fatal.
func (*Entry) Fatalln ¶ added in v0.0.4
func (entry *Entry) Fatalln(args ...interface{})
Fatalln logs a message at level Fatal.
func (*Entry) Info ¶ added in v0.0.4
func (entry *Entry) Info(args ...interface{})
Info logs a message at level Info.
func (*Entry) Infoln ¶ added in v0.0.4
func (entry *Entry) Infoln(args ...interface{})
Infoln logs a message at level Info.
func (*Entry) Panic ¶ added in v0.0.4
func (entry *Entry) Panic(args ...interface{})
Panic logs a message at level Panic.
func (*Entry) Panicln ¶ added in v0.0.4
func (entry *Entry) Panicln(args ...interface{})
Panicln logs a message at level Panic.
func (*Entry) Print ¶ added in v0.0.4
func (entry *Entry) Print(args ...interface{})
Print logs a message at level Print.
func (*Entry) Println ¶ added in v0.0.4
func (entry *Entry) Println(args ...interface{})
Println logs a message at level Print.
func (*Entry) Trace ¶ added in v0.0.4
func (entry *Entry) Trace(args ...interface{})
Trace logs a message at level Trace.
func (*Entry) Traceln ¶ added in v0.0.4
func (entry *Entry) Traceln(args ...interface{})
Traceln logs a message at level Trace.
func (*Entry) Warn ¶ added in v0.0.4
func (entry *Entry) Warn(args ...interface{})
Warn logs a message at level Warn.
func (*Entry) Warnln ¶ added in v0.0.4
func (entry *Entry) Warnln(args ...interface{})
Warnln logs a message at level Warn.
func (*Entry) WithCaller ¶ added in v0.0.4
WithCaller adds caller field to the Entry.
func (*Entry) WithContext ¶ added in v0.0.4
WithContext adds a context to the Entry.
func (*Entry) WithFields ¶ added in v0.0.4
WithFields adds a map of fields to the Entry.
func (*Entry) WithPrefix ¶ added in v0.0.4
WithPrefix adds a prefix as single field (using the key `prefix`) to the Entry.