aboutsummaryrefslogtreecommitdiff
path: root/bbot/worker/worker.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-07-06 11:39:58 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-06 11:39:58 +0300
commita56f29d8685e9595d8bf9a29296a72427fd3cf7a (patch)
tree3cff57c812c6f708801a6028b8114628a791d9b3 /bbot/worker/worker.cxx
parentd94f39c9e6eb78d14103f55a1586fae56de3b00d (diff)
Add timestamp to step id line in worker log
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r--bbot/worker/worker.cxx10
1 files changed, 9 insertions, 1 deletions
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 <libbutl/pager.mxx>
#include <libbutl/prompt.mxx>
#include <libbutl/utility.mxx> // to_utf8()
+#include <libbutl/timestamp.mxx>
#include <libbutl/filesystem.mxx>
#include <libbutl/string-parser.mxx>
@@ -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);