Documentation ¶
Overview ¶
Package logger contains a wrapper around logrus to support a centralized logging config.
Index ¶
- Variables
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Setup(config *Config) error
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func WithFields(fields logrus.Fields) *logrus.Entry
- func Writer() *io.PipeWriter
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLevel = errors.New("invalid log level")
ErrInvalidLevel is returned when an invalid log level is given in the config
View Source
var Logger *logrus.Logger
Logger is the main logger that is abstracted in this package. It is exported here for use with gorm.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a formatted debug messsage
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a formatted fatal error message
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a formatted informational message
func WithFields ¶
WithFields returns a new log enty with the provided fields
Types ¶
Click to show internal directories.
Click to hide internal directories.