MCPcopy
hub / github.com/kopia/kopia / webdavServerLogger

Function webdavServerLogger

internal/mount/mount_webdav.go:17–28  ·  view source on GitHub ↗
(r *http.Request, err error)

Source from the content-addressed store, hash-verified

15)
16
17func webdavServerLogger(r *http.Request, err error) {
18 var maybeRange string
19 if r := r.Header.Get("Range"); r != "" {
20 maybeRange = " " + r
21 }
22
23 if err != nil {
24 log(r.Context()).Errorf("%v %v%v err: %v\n", r.Method, r.URL.RequestURI(), maybeRange, err)
25 } else {
26 log(r.Context()).Debugf("%v %v%v OK\n", r.Method, r.URL.RequestURI(), maybeRange)
27 }
28}
29
30// DirectoryWebDAV exposes the provided filesystem directory via WebDAV on a random port on localhost
31// and returns a controller.

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.80
ContextMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected