Implement 'find similar page'. Fix some small bug
[httpd-crcsyncproxy.git] / crccache / ap_log_helper.c
blobf940e98fc7a641a035dc56e5688be520efac6f88
1 #include <stdarg.h>
3 #include "httpd.h"
4 #include "http_log.h"
5 #include <apr_strings.h>
7 void ap_log_hex(const char *file, int line, int level, apr_status_t status, const server_rec *s, unsigned char *buf, size_t len)
9 size_t cnt;
10 for (cnt=0; cnt < len; cnt += 32)
12 size_t cnt2;
13 char hexbuf[3*32+1];
14 for (cnt2=cnt; cnt2 != cnt+32 && cnt2 != len; cnt2++)
16 sprintf(hexbuf+3*(cnt2-cnt), "%02x.", buf[cnt2]);
18 ap_log_error(file, line, level, status, s, "%s", hexbuf);
22 char *format_hostinfo(apr_pool_t *p, server_rec *s)
24 return s->is_virtual ? apr_psprintf(p, "virtual host %s:%d", s->addrs->virthost, s->addrs->host_port) : "main server";