Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.New()
Functions ¶
func LogFailedQuery ¶
func LogFailedQuery(method string, query interface{}, error interface{})
LogFailedQuery takes a method name, query params, response error object and logs it
func LogSuccessfulQuery ¶
LogSuccessfulQuery takes a remote method name and execution time and logs it
Types ¶
type LoggingWriter ¶
type LoggingWriter struct {
http.ResponseWriter
Status int
ResponseSnippet string
ResponseSize int
}
LoggingWriter mimics http.ResponseWriter but stores a snippet of response, status code and response size for easier logging
func (*LoggingWriter) IsSuccess ¶
func (w *LoggingWriter) IsSuccess() bool
func (*LoggingWriter) WriteHeader ¶
func (w *LoggingWriter) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.