dont log thumbnail GETs by default

This commit is contained in:
ed 2021-05-28 05:16:01 +02:00
parent 68cecc52ab
commit 0a22b1ffb6
3 changed files with 3 additions and 3 deletions

View file

@ -288,7 +288,7 @@ def run_argparse(argv, formatter):
ap2.add_argument("--no-sendfile", action="store_true", help="disable sendfile")
ap2.add_argument("--no-scandir", action="store_true", help="disable scandir")
ap2.add_argument("--ihead", metavar="HEADER", action='append', help="dump incoming header")
ap2.add_argument("--lf-url", metavar="RE", type=str, default=r"^/\.cpr/", help="dont log URLs matching")
ap2.add_argument("--lf-url", metavar="RE", type=str, default=r"^/\.cpr/|\?th=[wj]$", help="dont log URLs matching")
return ap.parse_args(args=argv[1:])
# fmt: on

View file

@ -160,7 +160,7 @@ class HttpCli(object):
uparam["b"] = False
cookies["b"] = False
self.do_log = not self.conn.lf_url or not self.conn.lf_url.match(self.req)
self.do_log = not self.conn.lf_url or not self.conn.lf_url.search(self.req)
try:
if self.mode in ["GET", "HEAD"]:

View file

@ -167,7 +167,7 @@ class ThumbSrv(object):
self.busy[tpath] = [cond]
self.q.put([abspath, tpath])
self.log("conv {}".format(tpath))
self.log("conv {} \033[0m{}".format(tpath, abspath), c=6)
while not self.stopping:
with self.mutex: