Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ApacheFormatPattern = "%s - - [%s] \"%s %d %d\" %f\n"
Functions ¶
Types ¶
type AProcFunc ¶
type AProcFunc func(which PrePost, record *ApacheLogRecord, www http.ResponseWriter, req *http.Request)
var DBACleanupFunc AProcFunc = func(which PrePost, record *ApacheLogRecord, www http.ResponseWriter, req *http.Request) { if which == AProcPost { ymux.CleanupValue(www, req) } }
A Post Sample.
type ApacheLogRecord ¶
type ApacheLogRecord struct {
http.ResponseWriter
Ip string
Time time.Time
Method string
Uri string
Protocol string
Status int
ResponseBytes int64
ElapsedTime time.Duration
}
func (*ApacheLogRecord) Log ¶
func (r *ApacheLogRecord) Log(out io.Writer)
func (*ApacheLogRecord) WriteHeader ¶
func (r *ApacheLogRecord) WriteHeader(status int)
type ApacheLoggingHandler ¶
type ApacheLoggingHandler struct {
Pre []*AProcFunc
Post []*AProcFunc
// contains filtered or unexported fields
}
func (*ApacheLoggingHandler) AddProcFunc ¶
func (h *ApacheLoggingHandler) AddProcFunc(pre, post *AProcFunc)
func (*ApacheLoggingHandler) ServeHTTP ¶
func (h *ApacheLoggingHandler) ServeHTTP(www http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.