Better logging.

This commit is contained in:
Pedro Pinto committed 2020-10-16 20:13:39 -04:00
1 parent e780ba5867
commit e9cdb26d46
1 file changed
+2 -2
@@ -186,7 +186,7 @@ void SimOrchestrator::run() {
auto algo = make_algo(r->options.algo());
auto rid = db.begin_run(sid, r->options);
LOG(Spartan, Info, "Starting run {} ({} remaining) {}", rid,
--remaining_runs, utils::pb::to_string(r->options));
remaining_runs, utils::pb::to_string(r->options));
auto logger = [rid, &db](auto ts, auto const &entry_type,
auto const &args) {
db.log(rid, ts, entry_type, args);
@@ -198,7 +198,7 @@ void SimOrchestrator::run() {
ExchangeSim sim(rid, logger, ptrs);
auto pandl = sim.run(*algo, r->options);
db.end_run(rid, pandl.cash, pandl.position);
int rr = remaining_runs;
int rr = --remaining_runs;
LOG(Spartan, Info,
"Ended run {} ({} remaining) P&L: {} Pos P&L: {}. Options: "
"{}",