Documentation ¶
Index ¶
- Variables
- func Debug(args ...interface{})
- func Debugf(msg string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(msg string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(msg string, args ...interface{})
- func FromContext(ctx context.Context) *logrus.Entry
- func FromRequest(r *http.Request) *logrus.Entry
- func Info(args ...interface{})
- func Infof(msg string, args ...interface{})
- func Middleware(next http.Handler) http.Handler
- func Panic(args ...interface{})
- func Panicf(msg string, args ...interface{})
- func Warn(args ...interface{})
- func Warnf(msg string, args ...interface{})
- func WithContext(ctx context.Context, logger *logrus.Entry) context.Context
- func WithError(err error) *logrus.Entry
Constants ¶
This section is empty.
Variables ¶
var L = logrus.NewEntry(logrus.StandardLogger())
L is an alias for the the standard logger.
Functions ¶
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 ¶
FromContext retrieves the current logger from the context. If no logger is available, the default logger is returned.
func FromRequest ¶
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 ¶
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 ¶
WithContext returns a new context with the provided logger. Use in combination with logger.WithField(s) for great effect.
Types ¶
This section is empty.