MCPcopy Create free account
hub / github.com/apache/trafficserver / log

Method log

plugins/background_fetch/background_fetch.cc:329–361  ·  view source on GitHub ↗

Log format is: remap-tag bytes status url

Source from the content-addressed store, hash-verified

327// Log format is:
328// remap-tag bytes status url
329void
330BgFetchData::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

Callers 1

cont_bg_fetchFunction · 0.45

Calls 4

TSTextLogObjectWriteFunction · 0.85
getLogMethod · 0.45
onMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected