MCPcopy Create free account
hub / github.com/DoNewsCode/core / Write

Method Write

srvhttp/log.go:18–21  ·  view source on GitHub ↗

Write redirect the data stream to the underlying log.Logger

(p []byte)

Source from the content-addressed store, hash-verified

16
17// Write redirect the data stream to the underlying log.Logger
18func (a ApacheLogAdapter) Write(p []byte) (n int, err error) {
19 a.Logger.Log("msg", string(p))
20 return len(p), nil
21}
22
23// MakeApacheLogMiddleware creates a standard HTTP middleware responsible for access logging.
24func MakeApacheLogMiddleware(logger log.Logger) func(handler http.Handler) http.Handler {

Callers 6

Example_minimalFunction · 0.45
ExampleC_stackFunction · 0.45
encodeFunction · 0.45
ProvideHTTPMethod · 0.45
writeMethod · 0.45
writeMethod · 0.45

Calls 1

LogMethod · 0.80

Tested by 3

Example_minimalFunction · 0.36
ExampleC_stackFunction · 0.36
ProvideHTTPMethod · 0.36