Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: Added timestamp to each log message (#1304)
* Added timestamp to each log message

* Extra commit to pass title-format check
  • Loading branch information
fgvieira committed Jan 26, 2022
1 parent 735ab23 commit a5769f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snakemake/logging.py
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a5769f0

Please sign in to comment.