Log format is: remap-tag bytes status url
| 327 | // Log format is: |
| 328 | // remap-tag bytes status url |
| 329 | void |
| 330 | BgFetchData::log(TSEvent event) const |
| 331 | { |
| 332 | TSTextLogObject log = BgFetchState::getInstance().getLog(); |
| 333 | |
| 334 | if (log || Bg_dbg_ctl.on()) { |
| 335 | const char *status; |
| 336 | |
| 337 | switch (event) { |
| 338 | case TS_EVENT_VCONN_EOS: |
| 339 | status = "EOS"; |
| 340 | break; |
| 341 | case TS_EVENT_VCONN_INACTIVITY_TIMEOUT: |
| 342 | status = "TIMEOUT"; |
| 343 | break; |
| 344 | case TS_EVENT_ERROR: |
| 345 | status = "ERROR"; |
| 346 | break; |
| 347 | case TS_EVENT_VCONN_READ_COMPLETE: |
| 348 | status = "READ_COMP"; |
| 349 | break; |
| 350 | default: |
| 351 | status = "UNKNOWN"; |
| 352 | break; |
| 353 | } |
| 354 | |
| 355 | // ToDo: Also deal with per-remap tagging |
| 356 | Dbg(Bg_dbg_ctl, "%s %" PRId64 " %s %s", "-", _bytes, status, _url.c_str()); |
| 357 | if (log) { |
| 358 | TSTextLogObjectWrite(log, "%s %" PRId64 " %s %s", "-", _bytes, status, _url.c_str()); |
| 359 | } |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | ////////////////////////////////////////////////////////////////////////////// |
| 364 | // Continuation to perform a background fill of a URL. This is pretty |
no test coverage detected