Documentation ¶
Index ¶
- type Formatter
- type HTTPLogger
- func (log *HTTPLogger) Critical(res http.ResponseWriter, req *http.Request)
- func (log *HTTPLogger) Debug(res http.ResponseWriter, req *http.Request)
- func (log *HTTPLogger) Error(res http.ResponseWriter, req *http.Request)
- func (log *HTTPLogger) Info(res http.ResponseWriter, req *http.Request)
- func (log *HTTPLogger) Warning(res http.ResponseWriter, req *http.Request)
- type LogDestination
- type LogStashFormatter
- type LogStashJSON
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPLogger ¶
type HTTPLogger struct {
// contains filtered or unexported fields
}
func NewHTTPLogger ¶
func NewHTTPLogger(name string, destination LogDestination, formatter Formatter) (*HTTPLogger, error)
NewHTTPLogger constructor
func (*HTTPLogger) Critical ¶
func (log *HTTPLogger) Critical(res http.ResponseWriter, req *http.Request)
func (*HTTPLogger) Debug ¶
func (log *HTTPLogger) Debug(res http.ResponseWriter, req *http.Request)
func (*HTTPLogger) Error ¶
func (log *HTTPLogger) Error(res http.ResponseWriter, req *http.Request)
func (*HTTPLogger) Info ¶
func (log *HTTPLogger) Info(res http.ResponseWriter, req *http.Request)
func (*HTTPLogger) Warning ¶
func (log *HTTPLogger) Warning(res http.ResponseWriter, req *http.Request)
type LogDestination ¶
type LogDestination interface { Debug(data string, args ...interface{}) Info(data string, args ...interface{}) Warning(data string, args ...interface{}) Error(data string, args ...interface{}) Critical(data string, args ...interface{}) }
Implements similar to http://godoc.org/github.com/op/go-logging#Logger
type LogStashFormatter ¶
func NewLogStashFormatter ¶
func NewLogStashFormatter(source string, tags []string) (*LogStashFormatter, error)
func (*LogStashFormatter) Format ¶
func (formatter *LogStashFormatter) Format(customFields interface{}) (string, error)
type LogStashJSON ¶
type TextFormatter ¶
type TextFormatter struct {
AppName string
}
func NewTextFormatter ¶
func NewTextFormatter(appName string) (*TextFormatter, error)
func (*TextFormatter) Format ¶
func (f *TextFormatter) Format(customFields interface{}) (string, error)
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/op/go-logging
Package logging implements a logging infrastructure for Go.
|
Package logging implements a logging infrastructure for Go. |
Click to show internal directories.
Click to hide internal directories.