From 25bd5a823eba15c3fdbbc7d5af1e3307e5a02182 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 6 Jan 2021 17:40:42 +0100 Subject: [PATCH] fuse-client: add timestamps to logger --- bin/copyparty-fuse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/copyparty-fuse.py b/bin/copyparty-fuse.py index e03799e1..168ab262 100755 --- a/bin/copyparty-fuse.py +++ b/bin/copyparty-fuse.py @@ -104,7 +104,7 @@ def rice_tid(): def fancy_log(msg): - print("{} {}\n".format(rice_tid(), msg), end="") + print("{:10.6f} {} {}\n".format(time.time() % 900, rice_tid(), msg), end="") def null_log(msg): @@ -163,7 +163,7 @@ class RecentLog(object): thr.start() def put(self, msg): - msg = "{} {}\n".format(rice_tid(), msg) + msg = "{:10.6f} {} {}\n".format(time.time() % 900, rice_tid(), msg) if self.f: fmsg = " ".join([datetime.utcnow().strftime("%H%M%S.%f"), str(msg)]) self.f.write(fmsg.encode("utf-8"))