log

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

L is an alias for the the standard logger.

Functions

func Debug

func Debug(args ...interface{})

Debug logs debug level messages with default logger.

func Debugf

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

Debugf logs debug level messages with default logger in printf-style.

func Error

func Error(args ...interface{})

Error logs Error level messages with default logger in structured-style.

func Errorf

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

Errorf logs Error level messages with default logger in printf-style.

func Fatal

func Fatal(args ...interface{})

Fatal logs Fatal level messages with default logger in structured-style.

func Fatalf

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

Fatalf logs Fatalf level messages with default logger in printf-style.

func FromContext

func FromContext(ctx context.Context) *logrus.Entry

FromContext retrieves the current logger from the context. If no logger is available, the default logger is returned.

func FromRequest

func FromRequest(r *http.Request) *logrus.Entry

FromRequest retrieves the current logger from the request. If no logger is available, the default logger is returned.

func Info

func Info(args ...interface{})

Info logs Info level messages with default logger in structured-style.

func Infof

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

Infof logs Info level messages with default logger in printf-style.

func Middleware

func Middleware(next http.Handler) http.Handler

Middleware provides logging middleware.

func Panic

func Panic(args ...interface{})

Panic logs Panic level messages with default logger in structured-style.

func Panicf

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

Panicf logs Panicf level messages with default logger in printf-style.

func Warn

func Warn(args ...interface{})

Warn logs Warn level messages with default logger in structured-style.

func Warnf

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

Warnf logs Warn level messages with default logger in printf-style.

func WithContext

func WithContext(ctx context.Context, logger *logrus.Entry) context.Context

WithContext returns a new context with the provided logger. Use in combination with logger.WithField(s) for great effect.

func WithError

func WithError(err error) *logrus.Entry

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL