| 77 | } |
| 78 | |
| 79 | inline void |
| 80 | dump_header(DbgCtl const &ctl, HTTPHdr const *hdr, std::int64_t sm_id, std::string_view description) |
| 81 | { |
| 82 | if (ctl.on()) { |
| 83 | std::string output; |
| 84 | output.append("+++++++++ "); |
| 85 | output.append(description); |
| 86 | output.append(" +++++++++\n"); |
| 87 | output.append("-- State Machine Id: "); |
| 88 | output.append(std::to_string(sm_id)); |
| 89 | output.push_back('\n'); |
| 90 | if (hdr->valid()) { |
| 91 | s_dump_header(hdr, output); |
| 92 | } else { |
| 93 | output.append("Invalid header!\n"); |
| 94 | } |
| 95 | // We make a single call to fprintf so that the output does not get |
| 96 | // interleaved with output from other threads performing I/O. |
| 97 | fprintf(stderr, "%s", output.c_str()); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | using ink_time_t = time_t; |
| 102 |
no test coverage detected