diff --git a/copyparty/__main__.py b/copyparty/__main__.py index ffbf9edc..9338964c 100755 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -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-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("--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.add_argument("--no-reload", action="store_true", help="disable ?reload=cfg (reload users/volumes/volflags from config file)") diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 7fd6065a..7f231411 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -432,10 +432,11 @@ class HttpCli(object): em = str(ex) msg = em if pex == ex else min_ex() - self.log( - "{}\033[0m, {}".format(msg, self.vpath), - 6 if em.startswith("client d/c ") else 3, - ) + if pex.code != 404 or self.do_log: + self.log( + "{}\033[0m, {}".format(msg, self.vpath), + 6 if em.startswith("client d/c ") else 3, + ) msg = "{}\r\nURL: {}\r\n".format(em, self.vpath) if self.hint: @@ -972,6 +973,9 @@ class HttpCli(object): if self._applesan(): return True + if self.do_log: + self.log("MKCOL " + self.req) + return self._mkdir(self.vpath) def handle_move(self) -> bool: