Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoDropLogger ¶
type GoDropLogger interface { StdLogger Error(v ...interface{}) Errorf(format string, v ...interface{}) Errorln(v ...interface{}) }
GoDropLogger describes a logger that is based on the StdLogger but provides some additional utility methods used by GoDrop. A StdLogger can be wrapped using NewLogger.
func DefaultLogger ¶
func DefaultLogger() GoDropLogger
DefaultLogger just returns a new GoDropLogger based on log.Default.
func NewLogger ¶
func NewLogger(stdLogger StdLogger) GoDropLogger
NewLogger can wrap a StdLogger and just adds some more utility methods needed by the GoDropLogger. It can be used with any standard-lib compatible logger.
type StdLogger ¶
type StdLogger interface { Print(...interface{}) Printf(string, ...interface{}) Println(...interface{}) Fatal(...interface{}) Fatalf(string, ...interface{}) Fatalln(...interface{}) Panic(...interface{}) Panicf(string, ...interface{}) Panicln(...interface{}) }
StdLogger describes a logger that is compatible with the standard log.Logger but also logrus and others. As not to limit which loggers can and can't be used with the API.
This interface is from https://godoc.org/github.com/Sirupsen/logrus#StdLogger