Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoDropLogger ¶ added in v0.1.1
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 ¶ added in v0.1.1
func DefaultLogger() GoDropLogger
DefaultLogger just returns a new GoDropLogger based on log.Default.
func NewLogger ¶ added in v0.1.1
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 Server ¶ added in v0.1.1
type Server struct { Host string AllowedOrigins []string Repos *provider.Repositories Logger GoDropLogger // contains filtered or unexported fields }
type StdLogger ¶ added in v0.1.1
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