+
+static void log_1line_Z_HTTP(Z_HTTP_Request *req, Z_HTTP_Response *res, WRBUF w)
+{
+ wrbuf_printf(w, "%s %s HTTP/%s", req->method, req->path, req->version);
+ if (res)
+ wrbuf_printf(w, " %d %d", res->code, res->content_len);
+ else
+ wrbuf_printf(w, " ?");
+}
+
+static void log_1line_Z_GDU(Z_GDU *gdu_req, Z_GDU *gdu_res, WRBUF w)
+{
+ if (gdu_req && gdu_req->which == Z_GDU_Z3950)
+ {
+ log_1line_Z_APDU(gdu_req->u.z3950,
+ (gdu_res && gdu_res->which == Z_GDU_Z3950) ?
+ gdu_res->u.z3950 : 0, w);
+ }
+ else if (gdu_req && gdu_req->which == Z_GDU_HTTP_Request)
+ {
+ log_1line_Z_HTTP(gdu_req->u.HTTP_Request,
+ (gdu_res && gdu_res->which == Z_GDU_HTTP_Response) ?
+ gdu_res->u.HTTP_Response : 0, w);
+ }
+}
+