diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 04bf5ce0..a86df674 100755 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -804,7 +804,7 @@ def main(argv: Optional[list[str]] = None) -> None: S_VERSION, CODENAME, S_BUILD_DT, - py_desc().replace("[", "\033[1;30m["), + py_desc().replace("[", "\033[90m["), SQLITE_VER, JINJA_VER, PYFTPD_VER, diff --git a/copyparty/httpsrv.py b/copyparty/httpsrv.py index ff0ce449..b14d6ad2 100644 --- a/copyparty/httpsrv.py +++ b/copyparty/httpsrv.py @@ -200,7 +200,7 @@ class HttpSrv(object): while not self.stopping: if self.args.log_conn: - self.log(self.name, "|%sC-ncli" % ("-" * 1,), c="1;30") + self.log(self.name, "|%sC-ncli" % ("-" * 1,), c="90") if self.ncli >= self.nclimax: self.log(self.name, "at connection limit; waiting", 3) @@ -208,7 +208,7 @@ class HttpSrv(object): time.sleep(0.1) if self.args.log_conn: - self.log(self.name, "|%sC-acc1" % ("-" * 2,), c="1;30") + self.log(self.name, "|%sC-acc1" % ("-" * 2,), c="90") try: sck, addr = srv_sck.accept() @@ -221,7 +221,7 @@ class HttpSrv(object): t = "|{}C-acc2 \033[0;36m{} \033[3{}m{}".format( "-" * 3, ip, port % 8, port ) - self.log("%s %s" % addr, t, c="1;30") + self.log("%s %s" % addr, t, c="90") self.accept(sck, addr) @@ -328,7 +328,7 @@ class HttpSrv(object): fno = sck.fileno() try: if self.args.log_conn: - self.log("%s %s" % addr, "|%sC-crun" % ("-" * 4,), c="1;30") + self.log("%s %s" % addr, "|%sC-crun" % ("-" * 4,), c="90") cli.run() @@ -343,7 +343,7 @@ class HttpSrv(object): finally: sck = cli.s if self.args.log_conn: - self.log("%s %s" % addr, "|%sC-cdone" % ("-" * 5,), c="1;30") + self.log("%s %s" % addr, "|%sC-cdone" % ("-" * 5,), c="90") try: fno = sck.fileno() @@ -353,7 +353,7 @@ class HttpSrv(object): self.log( "%s %s" % addr, "shut({}): {}".format(fno, ex), - c="1;30", + c="90", ) if ex.errno not in E_SCK: raise diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index ae045bc0..d92b186e 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -269,7 +269,7 @@ class ThumbSrv(object): except Exception as ex: msg = "{} could not create thumbnail of {}\n{}" msg = msg.format(fun.__name__, abspath, min_ex()) - c: Union[str, int] = 1 if " Non finally: td = time.time() - t0 if td >= 1: - log("shut({}) in {:.3f} sec".format(fd, td), "1;30") + log("shut({}) in {:.3f} sec".format(fd, td), "90") sck.close()