From a56f29d8685e9595d8bf9a29296a72427fd3cf7a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 6 Jul 2021 11:39:58 +0300 Subject: Add timestamp to step id line in worker log --- bbot/worker/worker.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 2105939..6952af6 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -18,6 +18,7 @@ #include #include #include // to_utf8() +#include #include #include @@ -305,9 +306,14 @@ run_cmd (step_id step, if (bkp_step && *bkp_step == step) prompt (sid + " step is reached"); + string ts (to_string (system_clock::now (), + "%Y-%m-%d %H:%M:%S%[.N] %Z", + true /* special */, + true /* local */)); + // Log the step id and the command to be executed. // - l3 ([&]{t << "step id: " << sid;}); + l3 ([&]{t << "step id: " << sid << ' ' << ts;}); #ifndef _WIN32 log += "# step id: "; @@ -315,6 +321,8 @@ run_cmd (step_id step, log += "rem step id: "; #endif log += sid; + log += ' '; + log += ts; log += '\n'; t (c, n); -- cgit v1.1