Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions server/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"path"
"strings"

"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/stream"
"github.com/alist-org/alist/v3/server/middlewares"

Expand All @@ -31,6 +32,12 @@ func WebDav(dav *gin.RouterGroup) {
Prefix: path.Join(conf.URL.Path, "/dav"),
LockSystem: webdav.NewMemLS(),
Logger: func(request *http.Request, err error) {
// Skip logging for NotFoundError as it's not a program error
// but a normal case when a file doesn't exist
if errs.IsNotFoundError(err) {
log.Debugf("%s %s %v", request.Method, request.URL.Path, err)
return
}
log.Errorf("%s %s %+v", request.Method, request.URL.Path, err)
},
}
Expand Down