From a5769f0baeaa829b7813dee8c78902edbb42cf4b Mon Sep 17 00:00:00 2001 From: "Filipe G. Vieira" Date: Wed, 26 Jan 2022 09:33:24 +0100 Subject: [PATCH] feat: Added timestamp to each log message (#1304) * Added timestamp to each log message * Extra commit to pass title-format check --- snakemake/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snakemake/logging.py b/snakemake/logging.py index 46a3f9861..09c13a276 100644 --- a/snakemake/logging.py +++ b/snakemake/logging.py @@ -272,7 +272,7 @@ def log_handler(self, msg): Sends the log to the server. Args: - msg (dict): the log message dictionary + msg (dict): the log message dictionary """ import requests @@ -333,6 +333,7 @@ def remove_logfile(self): os.remove(self.logfile) def handler(self, msg): + msg["timestamp"] = time.time() for handler in self.log_handler: handler(msg)