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
)
10 for (cnt
=0; cnt
< len
; cnt
+= 32)
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";