MCPcopy Create free account
hub / github.com/apache/httpd / log_data_core

Function log_data_core

server/log.c:1507–1540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1505}
1506
1507static void log_data_core(const char *file, int line, int module_index,
1508 int level, const server_rec *s,
1509 const conn_rec *c, const request_rec *r,
1510 const char *label, const void *data, apr_size_t len,
1511 unsigned int flags)
1512{
1513 unsigned char buf[LOG_BYTES_BUFFER_SIZE];
1514 apr_size_t off;
1515 char prefix[20];
1516
1517 if (!(flags & AP_LOG_DATA_SHOW_OFFSET)) {
1518 prefix[0] = '\0';
1519 }
1520
1521 if (len > 0xffff) { /* bug in caller? */
1522 len = 0xffff;
1523 }
1524
1525 if (label) {
1526 log_error_va_glue(file, line, module_index, level, APR_SUCCESS, s,
1527 c, r, NULL, "%s (%" APR_SIZE_T_FMT " bytes)",
1528 label, len);
1529 }
1530
1531 off = 0;
1532 while (off < len) {
1533 if (flags & AP_LOG_DATA_SHOW_OFFSET) {
1534 apr_snprintf(prefix, sizeof prefix, "%04x: ", (unsigned int)off);
1535 }
1536 fmt_data(buf, data, len, &off);
1537 log_error_va_glue(file, line, module_index, level, APR_SUCCESS, s,
1538 c, r, NULL, "%s%s", prefix, buf);
1539 }
1540}
1541
1542AP_DECLARE(void) ap_log_data_(const char *file, int line,
1543 int module_index, int level,

Callers 4

ap_log_data_Function · 0.85
ap_log_rdata_Function · 0.85
ap_log_cdata_Function · 0.85
ap_log_csdata_Function · 0.85

Calls 2

log_error_va_glueFunction · 0.85
fmt_dataFunction · 0.85

Tested by

no test coverage detected