Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func DebugWithFields(fields Fields, args ...interface{})
- func DebugWithFieldsf(fields Fields, message string, args ...interface{})
- func Debugf(message string, args ...interface{})
- func Error(args ...interface{})
- func ErrorWithFields(fields Fields, args ...interface{})
- func ErrorWithFieldsf(fields Fields, message string, args ...interface{})
- func Errorf(message string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalWithFields(fields Fields, args ...interface{})
- func FatalWithFieldsf(fields Fields, message string, args ...interface{})
- func Fatalf(message string, args ...interface{})
- func Info(args ...interface{})
- func InfoWithFields(fields Fields, args ...interface{})
- func InfoWithFieldsf(fields Fields, message string, args ...interface{})
- func Infof(message string, args ...interface{})
- func New(isProduction bool, logLevel string) *logrus.Logger
- func Panic(args ...interface{})
- func PanicWithFields(fields Fields, args ...interface{})
- func PanicWithFieldsf(fields Fields, message string, args ...interface{})
- func Panicf(message string, args ...interface{})
- func ServerLogger() func(next http.Handler) http.Handler
- func Warn(args ...interface{})
- func WarnWithFields(fields Fields, args ...interface{})
- func WarnWithFieldsf(fields Fields, message string, args ...interface{})
- func Warnf(message string, args ...interface{})
- func Writer() *io.PipeWriter
- type Fields
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugWithFields ¶
func DebugWithFields(fields Fields, args ...interface{})
func DebugWithFieldsf ¶ added in v0.3.0
func ErrorWithFields ¶
func ErrorWithFields(fields Fields, args ...interface{})
func ErrorWithFieldsf ¶ added in v0.3.0
func FatalWithFields ¶
func FatalWithFields(fields Fields, args ...interface{})
func FatalWithFieldsf ¶ added in v0.3.0
func InfoWithFields ¶
func InfoWithFields(fields Fields, args ...interface{})
func InfoWithFieldsf ¶ added in v0.3.0
func PanicWithFields ¶
func PanicWithFields(fields Fields, args ...interface{})
func PanicWithFieldsf ¶ added in v0.3.0
func ServerLogger ¶
ServerLogger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
func WarnWithFields ¶
func WarnWithFields(fields Fields, args ...interface{})
func WarnWithFieldsf ¶ added in v0.3.0
func Writer ¶
func Writer() *io.PipeWriter
Types ¶
type Fields ¶
type Fields map[string]interface{}
Fields Type to pass when we want to call WithFields for structured logging
type Logger ¶
type Logger interface { Info(args ...interface{}) Infof(message string, args ...interface{}) Debug(args ...interface{}) Debugf(message string, args ...interface{}) Error(args ...interface{}) Errorf(message string, args ...interface{}) Warn(args ...interface{}) Warnf(message string, args ...interface{}) Fatal(args ...interface{}) Fatalf(message string, args ...interface{}) Panic(args ...interface{}) Panicf(message string, args ...interface{}) Writer() *io.PipeWriter }
Logger interface
func RequestLogger ¶
RequestLogger creates a logger with the request ID on it
Click to show internal directories.
Click to hide internal directories.