webdav: mute some macos spam

This commit is contained in:
ed 2022-10-30 17:45:28 +00:00
parent d562956809
commit c2f4090318
2 changed files with 9 additions and 5 deletions

View file

@ -684,7 +684,7 @@ def run_argparse(argv: list[str], formatter: Any, retry: bool) -> argparse.Names
ap2.add_argument("--log-conn", action="store_true", help="debug: print tcp-server msgs") ap2.add_argument("--log-conn", action="store_true", help="debug: print tcp-server msgs")
ap2.add_argument("--log-htp", action="store_true", help="debug: print http-server threadpool scaling") ap2.add_argument("--log-htp", action="store_true", help="debug: print http-server threadpool scaling")
ap2.add_argument("--ihead", metavar="HEADER", type=u, action='append', help="dump incoming header") ap2.add_argument("--ihead", metavar="HEADER", type=u, action='append', help="dump incoming header")
ap2.add_argument("--lf-url", metavar="RE", type=u, default=r"^/\.cpr/|\?th=[wj]$", help="dont log URLs matching") ap2.add_argument("--lf-url", metavar="RE", type=u, default=r"^/\.cpr/|\?th=[wj]$|/\.(_|ql_|DS_Store$|localized$)", help="dont log URLs matching")
ap2 = ap.add_argument_group('admin panel options') ap2 = ap.add_argument_group('admin panel options')
ap2.add_argument("--no-reload", action="store_true", help="disable ?reload=cfg (reload users/volumes/volflags from config file)") ap2.add_argument("--no-reload", action="store_true", help="disable ?reload=cfg (reload users/volumes/volflags from config file)")

View file

@ -432,10 +432,11 @@ class HttpCli(object):
em = str(ex) em = str(ex)
msg = em if pex == ex else min_ex() msg = em if pex == ex else min_ex()
self.log( if pex.code != 404 or self.do_log:
"{}\033[0m, {}".format(msg, self.vpath), self.log(
6 if em.startswith("client d/c ") else 3, "{}\033[0m, {}".format(msg, self.vpath),
) 6 if em.startswith("client d/c ") else 3,
)
msg = "{}\r\nURL: {}\r\n".format(em, self.vpath) msg = "{}\r\nURL: {}\r\n".format(em, self.vpath)
if self.hint: if self.hint:
@ -972,6 +973,9 @@ class HttpCli(object):
if self._applesan(): if self._applesan():
return True return True
if self.do_log:
self.log("MKCOL " + self.req)
return self._mkdir(self.vpath) return self._mkdir(self.vpath)
def handle_move(self) -> bool: def handle_move(self) -> bool: