| 8 | StdCoutLogger::~StdCoutLogger() = default; |
| 9 | |
| 10 | void StdCoutLogger::callback(Duration timestamp, const TreeNode& node, |
| 11 | NodeStatus prev_status, NodeStatus status) |
| 12 | { |
| 13 | using namespace std::chrono; |
| 14 | |
| 15 | constexpr const char* whitespaces = " "; |
| 16 | constexpr const size_t ws_count = 25; |
| 17 | |
| 18 | const double since_epoch = duration<double>(timestamp).count(); |
| 19 | printf("[%.3f]: %s%s %s -> %s", since_epoch, node.name().c_str(), |
| 20 | &whitespaces[std::min(ws_count, node.name().size())], |
| 21 | toStr(prev_status, true).c_str(), toStr(status, true).c_str()); |
| 22 | std::cout << std::endl; |
| 23 | } |
| 24 | |
| 25 | void StdCoutLogger::flush() |
| 26 | { |