Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLevel ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is used to parse CLI flags related to logging
type ElasticLogger ¶
type ElasticLogger struct {
// contains filtered or unexported fields
}
ElasticLogger wraps a L and satisfies the interface required by https://godoc.org/github.com/olivere/elastic#Logger
func NewElasticLogger ¶
func NewElasticLogger(l *L) *ElasticLogger
NewElasticLogger creates a new ElasticSearch compatible logger that wraps l
func (*ElasticLogger) Printf ¶
func (el *ElasticLogger) Printf(format string, v ...interface{})
Printf logs the message to the wrapped logger at the debug level
type HTTPLogger ¶
type HTTPLogger struct {
// contains filtered or unexported fields
}
HTTPLogger wraps a L and satisfys the interface required by https://godoc.org/github.com/ernesto-jimenez/httplogger#HTTPLogger
func NewHTTPLogger ¶
func NewHTTPLogger(l *L, level string) *HTTPLogger
NewHTTPLogger creates a new HTTPLogger. level is the log level at which you want your HTTP requests logged at.
func (*HTTPLogger) LogRequest ¶
func (h *HTTPLogger) LogRequest(*http.Request)
LogRequest doesn't do anything since we'll be logging replies only
func (*HTTPLogger) LogResponse ¶
func (h *HTTPLogger) LogResponse(req *http.Request, res *http.Response, err error, duration time.Duration)
LogResponse logs path, host, status code and duration in milliseconds
type L ¶
type L struct {
// contains filtered or unexported fields
}
func (*L) Fatal ¶
Fatal logs a message at the fatal level and also exits the program by calling os.Exit
type NSQLogger ¶
type NSQLogger struct {
// contains filtered or unexported fields
}
NSQLogger is a thin wrapper around our the Logger that bends it to the interface uses by the go-nsq library
func NewNSQLogger ¶
NewNSQLogger initializes a new Logger
type StripeLogger ¶
type StripeLogger struct {
// contains filtered or unexported fields
}
StripeLogger is a thin wrapper around our the Logger that bends it to the interface uses by the stripe library
func NewStripeLogger ¶
func NewStripeLogger(l *L, level string) *StripeLogger
NewStripeLogger initializes a new Logger
func (*StripeLogger) Printf ¶
func (l *StripeLogger) Printf(format string, v ...interface{})
Printf prints a message to the logs