1
0
Fork 0

First stage of access logging middleware. Initially without any output appenders.

This commit is contained in:
Richard Shepherd 2017-04-10 08:51:08 +01:00 committed by Timo Reimann
parent 4310bdf3ca
commit 73a1b172ed
9 changed files with 447 additions and 34 deletions

View file

@ -0,0 +1,18 @@
package accesslog
import "io"
type captureRequestReader struct {
source io.ReadCloser
count int64
}
func (r *captureRequestReader) Read(p []byte) (int, error) {
n, err := r.source.Read(p)
r.count += int64(n)
return n, err
}
func (r *captureRequestReader) Close() error {
return r.source.Close()
}