Lines Matching refs:buf
495 static int cpystrn(char *buf, const char *arg, int buflen)
500 end = apr_cpystrn(buf, arg, buflen);
501 return end - buf;
506 char *buf, int buflen)
509 return apr_snprintf(buf, buflen, "%s:%d", info->r->useragent_ip,
512 return apr_snprintf(buf, buflen, "%s:%d", info->c->client_ip,
519 char *buf, int buflen)
522 return apr_snprintf(buf, buflen, "%s:%d", info->c->local_ip,
529 char *buf, int buflen)
532 return apr_snprintf(buf, buflen, "%" APR_PID_T_FMT, pid);
536 char *buf, int buflen)
546 return apr_snprintf(buf, buflen, "%"APR_PID_T_FMT, tid);
554 return apr_snprintf(buf, buflen, "%pT", &tid);
561 char *buf, int buflen)
576 ap_recent_ctime_ex(buf, apr_time_now(), option, &time_len);
583 char *buf, int buflen)
588 return cpystrn(buf, priorities[info->level].t_name, buflen);
592 char *buf, int buflen)
601 return cpystrn(buf, info->c->log_id, buflen);
605 return cpystrn(buf, info->rmain->log_id, buflen);
611 char *buf, int buflen)
616 return apr_snprintf(buf, buflen, "%d", info->c->keepalives);
620 char *buf, int buflen)
622 return cpystrn(buf, ap_find_module_short_name(info->module_index), buflen);
626 char *buf, int buflen)
664 return apr_snprintf(buf, buflen, "%s(%d)", file, info->line);
669 char *buf, int buflen)
677 len = apr_snprintf(buf, buflen, "(%d)", status);
680 len = apr_snprintf(buf, buflen, "(EAI %d)",
684 len = apr_snprintf(buf, buflen, "(OS %d)",
688 len = apr_snprintf(buf, buflen, "(os 0x%08x)",
691 apr_strerror(status, buf + len, buflen - len);
692 len += strlen(buf + len);
697 char *buf, int buflen)
700 return cpystrn(buf, ap_get_server_name((request_rec *)info->r), buflen);
706 char *buf, int buflen)
709 return cpystrn(buf, info->s->server_hostname, buflen);
716 char *buf, int buflen)
724 return cpystrn(buf, scratch, buflen);
729 return cpystrn(buf, apr_table_get(table, name), buflen);
734 char *buf, int buflen)
737 return log_table_entry(info->r->headers_in, arg, buf, buflen);
743 char *buf, int buflen)
747 return log_table_entry(info->r->notes, arg, buf, buflen);
753 char *buf, int buflen)
756 return log_table_entry(info->r->subprocess_env, arg, buf, buflen);
853 static int do_errorlog_default(const ap_errorlog_info *info, char *buf,
865 buf[len++] = '[';
866 len += log_ctime(info, "u", buf + len, buflen - len);
867 buf[len++] = ']';
868 buf[len++] = ' ';
872 buf[len++] = '[';
873 len += log_module_name(info, NULL, buf + len, buflen - len);
874 buf[len++] = ':';
875 len += log_loglevel(info, NULL, buf + len, buflen - len);
876 len += cpystrn(buf + len, "] [pid ", buflen - len);
878 len += log_pid(info, NULL, buf + len, buflen - len);
881 len += cpystrn(buf + len, ":tid ", buflen - len);
882 item_len = log_tid(info, NULL, buf + len, buflen - len);
888 buf[len++] = ']';
889 buf[len++] = ' ';
893 item_len = log_file_line(info, NULL, buf + len, buflen - len);
896 len += cpystrn(buf + len, ": ", buflen - len);
901 item_len = log_apr_status(info, NULL, buf + len, buflen - len);
904 len += cpystrn(buf + len, ": ", buflen - len);
913 len += apr_snprintf(buf + len, buflen - len,
919 len += apr_snprintf(buf + len, buflen - len,
929 len += ap_escape_errorlog_item(buf + len, scratch,
934 len += apr_vsnprintf(buf + len, buflen - len, errstr_fmt, args);
939 len += cpystrn(buf + len, ", referer: ", buflen - len);
940 item_len = log_header(info, "Referer", buf + len, buflen - len);
950 char *buf, int buflen, int *errstr_start,
979 len += ap_escape_errorlog_item(buf + len, scratch,
984 len += apr_vsnprintf(buf + len, buflen - len, err_fmt, args);
996 int item_len = (*item->func)(info, item->arg, buf + len,
1001 buf[0] = '\0';
1005 buf[len++] = '-';
1344 static void fmt_data(unsigned char *buf, const void *vdata, apr_size_t len, apr_size_t *off)
1351 memset(buf, ' ', LOG_BYTES_BUFFER_SIZE - 1);
1352 buf[LOG_BYTES_BUFFER_SIZE - 1] = '\0';
1354 chars = buf; /* start character dump here */
1355 hex = buf + BYTES_LOGGED_PER_LINE + 1; /* start hex dump here */
1396 unsigned char buf[LOG_BYTES_BUFFER_SIZE];
1419 fmt_data(buf, data, len, &off);
1421 c, r, NULL, "%s%s", prefix, buf);
1578 char *buf, *endptr;
1597 buf = apr_palloc(p, BUFFER_SIZE);
1599 rv = apr_file_read_full(pid_file, buf, BUFFER_SIZE - 1, &bytes_read);
1606 if (bytes_read == 0 || bytes_read == BUFFER_SIZE - 1 || !apr_isdigit(*buf)) {
1610 buf[bytes_read] = '\0';
1611 *mypid = strtol(buf, &endptr, 10);